Fix z-check for flat road foundations
This commit is contained in:
@@ -2478,9 +2478,14 @@ static void TileLoop_Road(TileIndex tile)
|
|||||||
{
|
{
|
||||||
switch (_settings_game.game_creation.landscape) {
|
switch (_settings_game.game_creation.landscape) {
|
||||||
case LT_ARCTIC:
|
case LT_ARCTIC:
|
||||||
if (IsOnSnow(tile) != (GetTileZ(tile) > GetSnowLine())) {
|
{
|
||||||
ToggleSnow(tile);
|
/* Flat foundation tiles should look the same as the tiles they visually connect to. */
|
||||||
MarkTileDirtyByTile(tile);
|
int tile_z = GetFoundationSlope(tile) == SLOPE_FLAT ? GetTileMaxZ(tile) : GetTileZ(tile);
|
||||||
|
|
||||||
|
if (IsOnSnow(tile) != (tile_z > GetSnowLine())) {
|
||||||
|
ToggleSnow(tile);
|
||||||
|
MarkTileDirtyByTile(tile);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user