summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2012-03-25 18:19:21 +0000
committerrubidium <rubidium@openttd.org>2012-03-25 18:19:21 +0000
commitc8ce0faca49f85bbe72a3257bc327d14208f3d6c (patch)
tree56b823c849c2efdeb0bb4ef338eef35f5fd04c0a /src
parent02d9ecde6d54fda2a43d24acba8a90ee608c939a (diff)
downloadopenttd-c8ce0faca49f85bbe72a3257bc327d14208f3d6c.tar.xz
(svn r24064) -Fix [FS#5121]: make the full snowedness level of houses the same as roads and rails
Diffstat (limited to 'src')
-rw-r--r--src/town_cmd.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp
index 87b55146a..8731a5d78 100644
--- a/src/town_cmd.cpp
+++ b/src/town_cmd.cpp
@@ -2171,8 +2171,8 @@ static bool BuildTownHouse(Town *t, TileIndex tile)
/* no house allowed at all, bail out */
if (!CanBuildHouseHere(tile, t->index, false)) return false;
- int z;
- Slope slope = GetTileSlope(tile, &z);
+ Slope slope = GetTileSlope(tile);
+ int maxz = GetTileMaxZ(tile);
/* Get the town zone type of the current tile, as well as the climate.
* This will allow to easily compare with the specs of the new house to build */
@@ -2180,7 +2180,7 @@ static bool BuildTownHouse(Town *t, TileIndex tile)
/* Above snow? */
int land = _settings_game.game_creation.landscape;
- if (land == LT_ARCTIC && z >= HighestSnowLine()) land = -1;
+ if (land == LT_ARCTIC && maxz > HighestSnowLine()) land = -1;
uint bitmask = (1 << rad) + (1 << (land + 12));
@@ -2215,7 +2215,6 @@ static bool BuildTownHouse(Town *t, TileIndex tile)
houses[num++] = (HouseID)i;
}
- int maxz = GetTileMaxZ(tile);
TileIndex baseTile = tile;
while (probability_max > 0) {