summaryrefslogtreecommitdiff
path: root/src/settings.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-09-26 17:43:06 +0000
committerrubidium <rubidium@openttd.org>2009-09-26 17:43:06 +0000
commitac99610a05dce9510a3074658edcb745e0430504 (patch)
tree40dfa784f10b08e4f89a438f7744807d6ac801e2 /src/settings.cpp
parenta47138ad34f6b74ee83e0bdb3c5c9d317465ecb3 (diff)
downloadopenttd-ac99610a05dce9510a3074658edcb745e0430504.tar.xz
(svn r17644) -Fix [FS#3219]: some inconsistencies with the difficulty settings in the scenario editor. Also re-enable changing some difficulty settings (e.g. max loan) in the scenario editor.
Diffstat (limited to 'src/settings.cpp')
-rw-r--r--src/settings.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/settings.cpp b/src/settings.cpp
index 6fed56818..d7ac17356 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -1422,7 +1422,11 @@ CommandCost CmdChangeSetting(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
if ((sd->desc.flags & SGF_NETWORK_ONLY) && !_networking && _game_mode != GM_MENU) return CMD_ERROR;
if ((sd->desc.flags & SGF_NO_NETWORK) && _networking) return CMD_ERROR;
- if ((sd->desc.flags & SGF_NEWGAME_ONLY) && _game_mode != GM_MENU) return CMD_ERROR;
+ if ((sd->desc.flags & SGF_NEWGAME_ONLY) &&
+ (_game_mode == GM_NORMAL ||
+ (_game_mode == GM_EDITOR && (sd->desc.flags & SGF_SCENEDIT_TOO) == 0))) {
+ return CMD_ERROR;
+ }
if (flags & DC_EXEC) {
GameSettings *s = (_game_mode == GM_MENU) ? &_settings_newgame : &_settings_game;