summaryrefslogtreecommitdiff
path: root/src/genworld_gui.cpp
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2009-02-24 23:20:17 +0000
committeryexo <yexo@openttd.org>2009-02-24 23:20:17 +0000
commit5707f2c0284498dbaba0a7602f5c90a8d8f0057d (patch)
treefc963b1fbebf05c9649f4ae35eabcab184163f3e /src/genworld_gui.cpp
parent2f63571203b1f5f49889fb11735fb7895b1cd5c7 (diff)
downloadopenttd-5707f2c0284498dbaba0a7602f5c90a8d8f0057d.tar.xz
(svn r15573) -Fix (r15538): Terrain type and sea level couldn't be changed in the scenario editor.
Diffstat (limited to 'src/genworld_gui.cpp')
-rw-r--r--src/genworld_gui.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp
index 525e625e9..4c2aa4ddf 100644
--- a/src/genworld_gui.cpp
+++ b/src/genworld_gui.cpp
@@ -587,13 +587,21 @@ struct GenerateLandscapeWindow : public QueryStringBaseWindow {
}
break;
- case GLAND_TERRAIN_PULLDOWN:
+ case GLAND_TERRAIN_PULLDOWN: {
+ byte old_gm = _game_mode;
+ _game_mode = GM_MENU;
IConsoleSetSetting("difficulty.terrain_type", index);
+ _game_mode = old_gm;
break;
+ }
- case GLAND_WATER_PULLDOWN:
+ case GLAND_WATER_PULLDOWN: {
+ byte old_gm = _game_mode;
+ _game_mode = GM_MENU;
IConsoleSetSetting("difficulty.quantity_sea_lakes", index);
+ _game_mode = old_gm;
break;
+ }
}
this->SetDirty();
}