(svn r21694) -Fix: changing AI settings ingame was impossible when the difficulty level was other than custom

This commit is contained in:
yexo
2011-01-01 23:26:26 +00:00
parent c6a90361fc
commit a25d6c64dd
2 changed files with 4 additions and 1 deletions

View File

@@ -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;
}