summaryrefslogtreecommitdiff
path: root/src/elrail.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/elrail.cpp')
-rw-r--r--src/elrail.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/elrail.cpp b/src/elrail.cpp
index eda206356..f8868bd4e 100644
--- a/src/elrail.cpp
+++ b/src/elrail.cpp
@@ -401,9 +401,9 @@ static void DrawCatenaryRailway(const TileInfo *ti)
if (MayHaveBridgeAbove(ti->tile) && IsBridgeAbove(ti->tile)) {
Track bridgetrack = GetBridgeAxis(ti->tile) == AXIS_X ? TRACK_X : TRACK_Y;
- uint height = GetBridgePixelHeight(GetNorthernBridgeEnd(ti->tile));
+ uint height = GetBridgeHeight(GetNorthernBridgeEnd(ti->tile));
- if ((height <= GetTileMaxPixelZ(ti->tile) + TILE_HEIGHT) &&
+ if ((height <= GetTileMaxZ(ti->tile) + 1) &&
(i == PCPpositions[bridgetrack][0] || i == PCPpositions[bridgetrack][1])) {
SetBit(OverridePCP, i);
}
@@ -438,9 +438,9 @@ static void DrawCatenaryRailway(const TileInfo *ti)
/* Don't draw a wire under a low bridge */
if (MayHaveBridgeAbove(ti->tile) && IsBridgeAbove(ti->tile) && !IsTransparencySet(TO_CATENARY)) {
- uint height = GetBridgePixelHeight(GetNorthernBridgeEnd(ti->tile));
+ uint height = GetBridgeHeight(GetNorthernBridgeEnd(ti->tile));
- if (height <= GetTileMaxPixelZ(ti->tile) + TILE_HEIGHT) return;
+ if (height <= GetTileMaxZ(ti->tile) + 1) return;
}
SpriteID wire_normal = GetWireBase(ti->tile);