From a25d6c64dde115f6ee5c0cec54750257cc932388 Mon Sep 17 00:00:00 2001 From: yexo Date: Sat, 1 Jan 2011 23:26:26 +0000 Subject: (svn r21694) -Fix: changing AI settings ingame was impossible when the difficulty level was other than custom --- src/settings.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/settings.cpp') 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; } -- cgit v1.2.3-54-g00ecf