diff -r 37a0ca8812e0 -r e7d8faa8ba93 elrail.c --- a/elrail.c Thu Aug 31 10:36:59 2006 +0000 +++ b/elrail.c Thu Aug 31 11:18:30 2006 +0000 @@ -280,6 +280,14 @@ } } + /* Don't draw a wire under a low bridge */ + if (IsBridgeTile(ti->tile) && + IsBridgeMiddle(ti->tile) && + !(_display_opt & DO_TRANS_BUILDINGS) && + GetBridgeHeight(ti->tile) <= TilePixelHeight(ti->tile) + TILE_HEIGHT) { + return; + } + /* Drawing of pylons is finished, now draw the wires */ for (t = 0; t < TRACK_END; t++) { if (HASBIT(trackconfig[TS_HOME], t)) { @@ -290,13 +298,6 @@ const SortableSpriteStruct *sss; int tileh_selector = !(tileh[TS_HOME] % 3) * tileh[TS_HOME] / 3; /* tileh for the slopes, 0 otherwise */ - if ( /* We are not drawing a wire under a low bridge */ - IsBridgeTile(ti->tile) && - IsBridgeMiddle(ti->tile) && - !(_display_opt & DO_TRANS_BUILDINGS) && - GetBridgeHeight(ti->tile) <= TilePixelHeight(ti->tile) + TILE_HEIGHT - ) return; - assert(PCPconfig != 0); /* We have a pylon on neither end of the wire, that doesn't work (since we have no sprites for that) */ assert(!IsSteepSlope(tileh[TS_HOME])); sss = &CatenarySpriteData[Wires[tileh_selector][t][PCPconfig]];