summaryrefslogtreecommitdiff
path: root/src/elrail.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/elrail.cpp')
-rw-r--r--src/elrail.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/elrail.cpp b/src/elrail.cpp
index 4e43fe2e3..93cabaeb6 100644
--- a/src/elrail.cpp
+++ b/src/elrail.cpp
@@ -249,7 +249,7 @@ static void DrawCatenaryRailway(const TileInfo *ti)
Track bridgetrack = GetBridgeAxis(ti->tile) == AXIS_X ? TRACK_X : TRACK_Y;
uint height = GetBridgeHeight(GetNorthernBridgeEnd(ti->tile));
- if ((height <= TilePixelHeight(ti->tile) + TILE_HEIGHT) &&
+ if ((height <= GetTileMaxZ(ti->tile) + TILE_HEIGHT) &&
(i == PCPpositions[bridgetrack][0] || i == PCPpositions[bridgetrack][1])) {
SETBIT(OverridePCP, i);
}
@@ -289,7 +289,7 @@ static void DrawCatenaryRailway(const TileInfo *ti)
if (MayHaveBridgeAbove(ti->tile) && IsBridgeAbove(ti->tile) && !HASBIT(_transparent_opt, TO_BUILDINGS)) {
uint height = GetBridgeHeight(GetNorthernBridgeEnd(ti->tile));
- if (height <= TilePixelHeight(ti->tile) + TILE_HEIGHT) return;
+ if (height <= GetTileMaxZ(ti->tile) + TILE_HEIGHT) return;
}
/* Drawing of pylons is finished, now draw the wires */