summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2014-09-27 09:53:48 +0000
committerrubidium <rubidium@openttd.org>2014-09-27 09:53:48 +0000
commit550cd5038283fb2f5c6c77c458d5af673048cf82 (patch)
treecad452222167136f86936cc299ba71284596caf1
parente55bbe58fe0cba9fac27dc9ac0d5b2c2c4c40ee7 (diff)
downloadopenttd-550cd5038283fb2f5c6c77c458d5af673048cf82.tar.xz
(svn r26926) -Change: limit flat world height to the maximum configured map height
-rw-r--r--src/genworld_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp
index 438da5e4b..d968663f8 100644
--- a/src/genworld_gui.cpp
+++ b/src/genworld_gui.cpp
@@ -994,7 +994,7 @@ struct CreateScenarioWindow : public Window
this->HandleButtonClick(widget);
this->SetDirty();
- _settings_newgame.game_creation.se_flat_world_height = Clamp(_settings_newgame.game_creation.se_flat_world_height + widget - WID_CS_FLAT_LAND_HEIGHT_TEXT, 0, MAX_TILE_HEIGHT);
+ _settings_newgame.game_creation.se_flat_world_height = Clamp(_settings_newgame.game_creation.se_flat_world_height + widget - WID_CS_FLAT_LAND_HEIGHT_TEXT, 0, _settings_game.construction.max_heightlevel);
}
_left_button_clicked = false;
break;
@@ -1040,7 +1040,7 @@ struct CreateScenarioWindow : public Window
case WID_CS_FLAT_LAND_HEIGHT_TEXT:
this->SetWidgetDirty(WID_CS_FLAT_LAND_HEIGHT_TEXT);
- _settings_newgame.game_creation.se_flat_world_height = Clamp(value, 0, MAX_TILE_HEIGHT);
+ _settings_newgame.game_creation.se_flat_world_height = Clamp(value, 0, _settings_game.construction.max_heightlevel);
break;
}