mirror of https://github.com/OpenTTD/OpenTTD.git
This commit is contained in:
parent
d7137651f2
commit
4cbaac6dac
|
@ -1964,12 +1964,15 @@ static_assert(lengthof(_town_road_types_2) == HZB_END);
|
|||
static void TileLoop_Road(TileIndex tile)
|
||||
{
|
||||
switch (_settings_game.game_creation.landscape) {
|
||||
case LT_ARCTIC:
|
||||
if (IsOnSnow(tile) != (GetTileZ(tile) > GetSnowLine())) {
|
||||
case LT_ARCTIC: {
|
||||
/* Roads on flat foundations use the snow level of the height they are elevated to. All others use the snow level of their minimum height. */
|
||||
int tile_z = (std::get<Slope>(GetFoundationSlope(tile)) == SLOPE_FLAT) ? GetTileMaxZ(tile) : GetTileZ(tile);
|
||||
if (IsOnSnow(tile) != (tile_z > GetSnowLine())) {
|
||||
ToggleSnow(tile);
|
||||
MarkTileDirtyByTile(tile);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case LT_TROPIC:
|
||||
if (GetTropicZone(tile) == TROPICZONE_DESERT && !IsOnDesert(tile)) {
|
||||
|
|
Loading…
Reference in New Issue