summaryrefslogtreecommitdiff
path: root/src/newgrf_commons.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/newgrf_commons.cpp')
-rw-r--r--src/newgrf_commons.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/newgrf_commons.cpp b/src/newgrf_commons.cpp
index 6fe8e56e4..7306f28cc 100644
--- a/src/newgrf_commons.cpp
+++ b/src/newgrf_commons.cpp
@@ -333,9 +333,13 @@ uint32 GetTerrainType(TileIndex tile, TileContext context)
}
case MP_TUNNELBRIDGE:
- /* During map generation the snowstate may not be valid yet, as the tileloop may not have run yet. */
- if (_generating_world) goto genworld; // we do not care about foundations here
- has_snow = HasTunnelBridgeSnowOrDesert(tile);
+ if (context == TC_ON_BRIDGE) {
+ has_snow = (GetBridgeHeight(tile) > GetSnowLine());
+ } else {
+ /* During map generation the snowstate may not be valid yet, as the tileloop may not have run yet. */
+ if (_generating_world) goto genworld; // we do not care about foundations here
+ has_snow = HasTunnelBridgeSnowOrDesert(tile);
+ }
break;
case MP_STATION: