summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2014-09-21 11:53:06 +0000
committerrubidium <rubidium@openttd.org>2014-09-21 11:53:06 +0000
commitcfe08b86c9275fbfe42e5b49572720b01fb2de1d (patch)
treef0e8a4f8458870dfc4d00c0a89bed0d74c93b62f /src
parentce04c49e3d021451e8ad17e8a53e4e515f261209 (diff)
downloadopenttd-cfe08b86c9275fbfe42e5b49572720b01fb2de1d.tar.xz
(svn r26883) -Change: make maximum desert height scale with the maximum configured height
Diffstat (limited to 'src')
-rw-r--r--src/landscape.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/landscape.cpp b/src/landscape.cpp
index c4116eaaf..0f21b2920 100644
--- a/src/landscape.cpp
+++ b/src/landscape.cpp
@@ -892,6 +892,7 @@ static void CreateDesertOrRainForest()
{
TileIndex update_freq = MapSize() / 4;
const TileIndexDiffC *data;
+ uint max_desert_height = CeilDiv(_settings_game.construction.max_heightlevel, 4);
for (TileIndex tile = 0; tile != MapSize(); ++tile) {
if ((tile % update_freq) == 0) IncreaseGeneratingWorldProgress(GWP_LANDSCAPE);
@@ -901,7 +902,7 @@ static void CreateDesertOrRainForest()
for (data = _make_desert_or_rainforest_data;
data != endof(_make_desert_or_rainforest_data); ++data) {
TileIndex t = AddTileIndexDiffCWrap(tile, *data);
- if (t != INVALID_TILE && (TileHeight(t) >= 4 || IsTileType(t, MP_WATER))) break;
+ if (t != INVALID_TILE && (TileHeight(t) >= max_desert_height || IsTileType(t, MP_WATER))) break;
}
if (data == endof(_make_desert_or_rainforest_data)) {
SetTropicZone(tile, TROPICZONE_DESERT);