diff options
author | frosch <frosch@openttd.org> | 2012-01-22 18:37:01 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2012-01-22 18:37:01 +0000 |
commit | 428e5d31032af7bbbc9a8482cf1b94bd9a98a1bb (patch) | |
tree | 40fb8b433d20a1bb9f5d933cd0721b27b76bc4fc | |
parent | f6487875daab0edf09423bd28f87bb008e93ea5c (diff) | |
download | openttd-428e5d31032af7bbbc9a8482cf1b94bd9a98a1bb.tar.xz |
(svn r23839) -Feature: Allow command line options -e and -g to be combined to load saves/scenarios directly into SE.
-rw-r--r-- | src/openttd.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp index e892ebd5d..4644d1406 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -598,11 +598,11 @@ int ttd_main(int argc, char *argv[]) if (mgo.opt != NULL) SetDebugString(mgo.opt); break; } - case 'e': _switch_mode = SM_EDITOR; break; + case 'e': _switch_mode = (_switch_mode == SM_LOAD_GAME || _switch_mode == SM_LOAD_SCENARIO ? SM_LOAD_SCENARIO : SM_EDITOR); break; case 'g': if (mgo.opt != NULL) { strecpy(_file_to_saveload.name, mgo.opt, lastof(_file_to_saveload.name)); - _switch_mode = SM_LOAD_GAME; + _switch_mode = (_switch_mode == SM_EDITOR || _switch_mode == SM_LOAD_SCENARIO ? SM_LOAD_SCENARIO : SM_LOAD_GAME); _file_to_saveload.mode = SL_LOAD; /* if the file doesn't exist or it is not a valid savegame, let the saveload code show an error */ |