summaryrefslogtreecommitdiff
path: root/src/settings_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-09-20 17:19:45 +0000
committerrubidium <rubidium@openttd.org>2009-09-20 17:19:45 +0000
commit2049d60e3460904e167fdd3e653b5e70fa4f0c9f (patch)
tree6b077e4bf460ac17e5c94ab2c78bffa286bdde3f /src/settings_gui.cpp
parentbae15616f7ba2bc1ca23dd435dd158696c43188a (diff)
downloadopenttd-2049d60e3460904e167fdd3e653b5e70fa4f0c9f.tar.xz
(svn r17588) -Fix [FS#3220]: erroneous message about changing the difficulty level
Diffstat (limited to 'src/settings_gui.cpp')
-rw-r--r--src/settings_gui.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp
index 08181bff6..3adf3542f 100644
--- a/src/settings_gui.cpp
+++ b/src/settings_gui.cpp
@@ -719,6 +719,9 @@ public:
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 @@ public:
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