mirror of https://github.com/OpenTTD/OpenTTD
(svn r20421) -Change [FS#3947]: Make snowyness of bridgehead depend on the tileheight at the entry edge.
parent
48c5091a7c
commit
c2b1c624dd
|
@ -1396,12 +1396,17 @@ static void TileLoop_TunnelBridge(TileIndex tile)
|
||||||
{
|
{
|
||||||
bool snow_or_desert = HasTunnelBridgeSnowOrDesert(tile);
|
bool snow_or_desert = HasTunnelBridgeSnowOrDesert(tile);
|
||||||
switch (_settings_game.game_creation.landscape) {
|
switch (_settings_game.game_creation.landscape) {
|
||||||
case LT_ARCTIC:
|
case LT_ARCTIC: {
|
||||||
if (snow_or_desert != (GetTileZ(tile) > GetSnowLine())) {
|
/* 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) ? GetTileMaxZ(tile) : GetTileZ(tile);
|
||||||
|
if (snow_or_desert != (z > GetSnowLine())) {
|
||||||
SetTunnelBridgeSnowOrDesert(tile, !snow_or_desert);
|
SetTunnelBridgeSnowOrDesert(tile, !snow_or_desert);
|
||||||
MarkTileDirtyByTile(tile);
|
MarkTileDirtyByTile(tile);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case LT_TROPIC:
|
case LT_TROPIC:
|
||||||
if (GetTropicZone(tile) == TROPICZONE_DESERT && !snow_or_desert) {
|
if (GetTropicZone(tile) == TROPICZONE_DESERT && !snow_or_desert) {
|
||||||
|
|
Loading…
Reference in New Issue