diff options
author | yexo <yexo@openttd.org> | 2011-01-01 23:26:26 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2011-01-01 23:26:26 +0000 |
commit | a25d6c64dde115f6ee5c0cec54750257cc932388 (patch) | |
tree | 6f2ab6fc368ae114aaa200202549eacb0706b7a8 /src/settings.cpp | |
parent | c6a90361fce4e29c9b8093b2c876ca08f521f192 (diff) | |
download | openttd-a25d6c64dde115f6ee5c0cec54750257cc932388.tar.xz |
(svn r21694) -Fix: changing AI settings ingame was impossible when the difficulty level was other than custom
Diffstat (limited to 'src/settings.cpp')
-rw-r--r-- | src/settings.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/settings.cpp b/src/settings.cpp index 964631f5d..82b3a3538 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -977,6 +977,9 @@ static void ValidateSettings() static bool DifficultyReset(int32 level) { + /* In game / in the scenario editor you can set the difficulty level only to custom. This is + * needed by the AI Gui code that sets the difficulty level when you change any AI settings. */ + if (_game_mode != GM_MENU && level != 3) return false; SetDifficultyLevel(level, (_game_mode == GM_MENU) ? &_settings_newgame.difficulty : &_settings_game.difficulty); return true; } |