mirror of https://github.com/OpenTTD/OpenTTD
(svn r23839) -Feature: Allow command line options -e and -g to be combined to load saves/scenarios directly into SE.
parent
f6487875da
commit
428e5d3103
|
@ -598,11 +598,11 @@ int ttd_main(int argc, char *argv[])
|
||||||
if (mgo.opt != NULL) SetDebugString(mgo.opt);
|
if (mgo.opt != NULL) SetDebugString(mgo.opt);
|
||||||
break;
|
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':
|
case 'g':
|
||||||
if (mgo.opt != NULL) {
|
if (mgo.opt != NULL) {
|
||||||
strecpy(_file_to_saveload.name, mgo.opt, lastof(_file_to_saveload.name));
|
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;
|
_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 */
|
/* if the file doesn't exist or it is not a valid savegame, let the saveload code show an error */
|
||||||
|
|
Loading…
Reference in New Issue