mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r26883) -Change: make maximum desert height scale with the maximum configured height
This commit is contained in:
parent
ce04c49e3d
commit
cfe08b86c9
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue