summaryrefslogtreecommitdiff
path: root/src/tunnelbridge_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tunnelbridge_cmd.cpp')
-rw-r--r--src/tunnelbridge_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp
index 700151560..e9e221bd0 100644
--- a/src/tunnelbridge_cmd.cpp
+++ b/src/tunnelbridge_cmd.cpp
@@ -1457,7 +1457,7 @@ static void TileLoop_TunnelBridge(TileIndex tile)
/* As long as we do not have a snow density, we want to use the density
* from the entry endge. For tunnels this is the lowest point for bridges the highest point.
* (Independent of foundations) */
- uint z = IsBridge(tile) ? GetTileMaxPixelZ(tile) : GetTilePixelZ(tile);
+ uint z = IsBridge(tile) ? GetTileMaxZ(tile) : GetTileZ(tile);
if (snow_or_desert != (z > GetSnowLine())) {
SetTunnelBridgeSnowOrDesert(tile, !snow_or_desert);
MarkTileDirtyByTile(tile);