diff options
author | terkhen <terkhen@openttd.org> | 2010-11-04 19:34:40 +0000 |
---|---|---|
committer | terkhen <terkhen@openttd.org> | 2010-11-04 19:34:40 +0000 |
commit | 42ee8f7df7598143753d85a6ca08374164b10f15 (patch) | |
tree | 642028cc461b3c139581f3ba0153e243a9e5a461 | |
parent | dbfffd717f0e7806626b0209104ae9befa6860ae (diff) | |
download | openttd-42ee8f7df7598143753d85a6ca08374164b10f15.tar.xz |
(svn r21082) -Fix (r21080): Compilation error.
-rw-r--r-- | src/settings.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/settings.cpp b/src/settings.cpp index 7ef204045..f4a166da5 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -902,21 +902,6 @@ static bool InvalidateIndustryViewWindow(int32 p1) return true; } -/** Checks if any settings are set to incorrect values, and sets them to correct values in that case. */ -static void ValidateSettings() -{ - /* Force the difficulty levels to correct values if they are invalid. */ - if (_settings_newgame.difficulty.diff_level != 3) { - SetDifficultyLevel(_settings_newgame.difficulty.diff_level, &_settings_newgame.difficulty); - } - - /* Do not allow a custom sea level with the original land generator. */ - if (_settings_newgame.game_creation.land_generator == 0 && - _settings_newgame.difficulty.quantity_sea_lakes == CUSTOM_SEA_LEVEL_NUMBER_DIFFICULTY) { - _settings_newgame.difficulty.quantity_sea_lakes = CUSTOM_SEA_LEVEL_MIN_PERCENTAGE; - } -} - /* * A: competitors * B: competitor start time. Deprecated since savegame version 110. @@ -956,6 +941,21 @@ void SetDifficultyLevel(int mode, DifficultySettings *gm_opt) } } +/** Checks if any settings are set to incorrect values, and sets them to correct values in that case. */ +static void ValidateSettings() +{ + /* Force the difficulty levels to correct values if they are invalid. */ + if (_settings_newgame.difficulty.diff_level != 3) { + SetDifficultyLevel(_settings_newgame.difficulty.diff_level, &_settings_newgame.difficulty); + } + + /* Do not allow a custom sea level with the original land generator. */ + if (_settings_newgame.game_creation.land_generator == 0 && + _settings_newgame.difficulty.quantity_sea_lakes == CUSTOM_SEA_LEVEL_NUMBER_DIFFICULTY) { + _settings_newgame.difficulty.quantity_sea_lakes = CUSTOM_SEA_LEVEL_MIN_PERCENTAGE; + } +} + static bool DifficultyReset(int32 level) { SetDifficultyLevel(level, (_game_mode == GM_MENU) ? &_settings_newgame.difficulty : &_settings_game.difficulty); |