diff options
author | frosch <frosch@openttd.org> | 2010-08-09 07:32:04 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2010-08-09 07:32:04 +0000 |
commit | 7f1425c333327858dcd48db7c2718cd1d9d777c7 (patch) | |
tree | 69afdaff7326a8a2a9630b3ba6e62169a95d7d3a /src/newgrf_commons.cpp | |
parent | b6cf38a9123bc560fe8b4dfcbfe492f5577c64ce (diff) | |
download | openttd-7f1425c333327858dcd48db7c2718cd1d9d777c7.tar.xz |
(svn r20423) -Change [FS#3947]: Make snow on bridges depend on bridgeheight.
Diffstat (limited to 'src/newgrf_commons.cpp')
-rw-r--r-- | src/newgrf_commons.cpp | 10 |
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: |