mirror of https://github.com/OpenTTD/OpenTTD
(svn r26883) -Change: make maximum desert height scale with the maximum configured height
parent
ce04c49e3d
commit
cfe08b86c9
|
@ -892,6 +892,7 @@ static void CreateDesertOrRainForest()
|
||||||
{
|
{
|
||||||
TileIndex update_freq = MapSize() / 4;
|
TileIndex update_freq = MapSize() / 4;
|
||||||
const TileIndexDiffC *data;
|
const TileIndexDiffC *data;
|
||||||
|
uint max_desert_height = CeilDiv(_settings_game.construction.max_heightlevel, 4);
|
||||||
|
|
||||||
for (TileIndex tile = 0; tile != MapSize(); ++tile) {
|
for (TileIndex tile = 0; tile != MapSize(); ++tile) {
|
||||||
if ((tile % update_freq) == 0) IncreaseGeneratingWorldProgress(GWP_LANDSCAPE);
|
if ((tile % update_freq) == 0) IncreaseGeneratingWorldProgress(GWP_LANDSCAPE);
|
||||||
|
@ -901,7 +902,7 @@ static void CreateDesertOrRainForest()
|
||||||
for (data = _make_desert_or_rainforest_data;
|
for (data = _make_desert_or_rainforest_data;
|
||||||
data != endof(_make_desert_or_rainforest_data); ++data) {
|
data != endof(_make_desert_or_rainforest_data); ++data) {
|
||||||
TileIndex t = AddTileIndexDiffCWrap(tile, *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)) {
|
if (data == endof(_make_desert_or_rainforest_data)) {
|
||||||
SetTropicZone(tile, TROPICZONE_DESERT);
|
SetTropicZone(tile, TROPICZONE_DESERT);
|
||||||
|
|
Loading…
Reference in New Issue