From 7f1425c333327858dcd48db7c2718cd1d9d777c7 Mon Sep 17 00:00:00 2001 From: frosch Date: Mon, 9 Aug 2010 07:32:04 +0000 Subject: (svn r20423) -Change [FS#3947]: Make snow on bridges depend on bridgeheight. --- src/newgrf_commons.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/newgrf_commons.cpp') 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: -- cgit v1.2.3-54-g00ecf