changeset 13088:1008c63fa996 draft

(svn r17588) -Fix [FS#3220]: erroneous message about changing the difficulty level
author rubidium <rubidium@openttd.org>
date Sun, 20 Sep 2009 17:19:45 +0000
parents 1eaadcbb6718
children 559dafab3ecb
files src/settings_gui.cpp
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/settings_gui.cpp
+++ b/src/settings_gui.cpp
@@ -719,6 +719,9 @@
 				GameSettings *opt_ptr = (_game_mode == GM_MENU) ? &_settings_newgame : &_settings_game;
 
 				uint i;
+				GetSettingFromName("difficulty.diff_level", &i);
+				DoCommandP(0, i, this->opt_mod_temp.difficulty.diff_level, CMD_CHANGE_SETTING);
+
 				const SettingDesc *sd = GetSettingFromName("difficulty.max_no_competitors", &i);
 				for (uint btn = 0; btn != GAME_DIFFICULTY_NUM; btn++, sd++) {
 					int32 new_val = (int32)ReadValue(GetVariableAddress(&this->opt_mod_temp, &sd->save), sd->save.conv);
@@ -728,9 +731,6 @@
 						DoCommandP(0, i + btn, new_val, CMD_CHANGE_SETTING);
 					}
 				}
-
-				GetSettingFromName("difficulty.diff_level", &i);
-				DoCommandP(0, i, this->opt_mod_temp.difficulty.diff_level, CMD_CHANGE_SETTING);
 				delete this;
 				/* If we are in the editor, we should reload the economy.
 				 * This way when you load a game, the max loan and interest rate