1
0
Fork 0

(svn r26926) -Change: limit flat world height to the maximum configured map height

release/1.5
rubidium 2014-09-27 09:53:48 +00:00
parent e55bbe58fe
commit 550cd50382
1 changed files with 2 additions and 2 deletions

View File

@ -994,7 +994,7 @@ struct CreateScenarioWindow : public Window
this->HandleButtonClick(widget); this->HandleButtonClick(widget);
this->SetDirty(); 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; _left_button_clicked = false;
break; break;
@ -1040,7 +1040,7 @@ struct CreateScenarioWindow : public Window
case WID_CS_FLAT_LAND_HEIGHT_TEXT: case WID_CS_FLAT_LAND_HEIGHT_TEXT:
this->SetWidgetDirty(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; break;
} }