summaryrefslogtreecommitdiff
path: root/openttd.c
diff options
context:
space:
mode:
Diffstat (limited to 'openttd.c')
-rw-r--r--openttd.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/openttd.c b/openttd.c
index c591e259e..ede882c11 100644
--- a/openttd.c
+++ b/openttd.c
@@ -707,12 +707,11 @@ bool SafeSaveOrLoad(const char *filename, int mode, int newgm)
_game_mode = newgm;
r = SaveOrLoad(filename, mode);
if (r == SL_REINIT) {
- if (ogm == GM_MENU)
- LoadIntroGame();
- else if (ogm == GM_EDITOR)
- MakeNewEditorWorld();
- else
- MakeNewGame();
+ switch (ogm) {
+ case GM_MENU: LoadIntroGame(); break;
+ case GM_EDITOR: MakeNewEditorWorld(); break;
+ default: MakeNewGame(); break;
+ }
return false;
} else if (r != SL_OK) {
_game_mode = ogm;