mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-25 22:05:20 -04:00
netgame: enable -loadgame (#371)
* netgame: enable -loadgame * fix -record -loadgame
This commit is contained in:
parent
1dc57a508a
commit
581d645558
@ -133,6 +133,7 @@ int startepisode;
|
||||
int startmap;
|
||||
boolean autostart;
|
||||
FILE *debugfile;
|
||||
int startloadgame;
|
||||
|
||||
boolean advancedemo;
|
||||
|
||||
@ -2232,6 +2233,17 @@ void D_DoomMain(void)
|
||||
if (*startup5) puts(startup5);
|
||||
// End new startup strings
|
||||
|
||||
p = M_CheckParmWithArgs("-loadgame", 1);
|
||||
if (p)
|
||||
{
|
||||
startloadgame = atoi(myargv[p+1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Not loading a game
|
||||
startloadgame = -1;
|
||||
}
|
||||
|
||||
puts("M_Init: Init miscellaneous info.");
|
||||
M_Init();
|
||||
|
||||
@ -2315,13 +2327,17 @@ void D_DoomMain(void)
|
||||
demowarp = -1;
|
||||
|
||||
if (slot && ++slot < myargc)
|
||||
{
|
||||
char *file;
|
||||
slot = atoi(myargv[slot]); // killough 3/16/98: add slot info
|
||||
file = G_SaveGameName(slot); // killough 3/22/98
|
||||
G_LoadGame(file, slot, true); // killough 5/15/98: add command flag
|
||||
(free)(file);
|
||||
}
|
||||
{
|
||||
startloadgame = atoi(myargv[slot]);
|
||||
}
|
||||
|
||||
if (startloadgame >= 0)
|
||||
{
|
||||
char *file;
|
||||
file = G_SaveGameName(startloadgame);
|
||||
G_LoadGame(file, startloadgame, true); // killough 5/15/98: add command flag
|
||||
(free)(file);
|
||||
}
|
||||
else
|
||||
if (!singledemo) // killough 12/98
|
||||
{
|
||||
|
@ -106,7 +106,7 @@ static void LoadGameSettings(net_gamesettings_t *settings)
|
||||
startepisode = settings->episode;
|
||||
startmap = settings->map;
|
||||
startskill = settings->skill;
|
||||
//startloadgame = settings->loadgame;
|
||||
startloadgame = settings->loadgame;
|
||||
lowres_turn = settings->lowres_turn;
|
||||
nomonsters = settings->nomonsters;
|
||||
fastparm = settings->fast_monsters;
|
||||
@ -159,7 +159,7 @@ static void SaveGameSettings(net_gamesettings_t *settings)
|
||||
settings->episode = startepisode;
|
||||
settings->map = startmap;
|
||||
settings->skill = startskill;
|
||||
//settings->loadgame = startloadgame;
|
||||
settings->loadgame = startloadgame;
|
||||
settings->gameversion = gameversion;
|
||||
settings->nomonsters = nomonsters;
|
||||
settings->fast_monsters = fastparm;
|
||||
|
@ -149,6 +149,9 @@ extern skill_t startskill;
|
||||
extern int startepisode;
|
||||
extern int startmap;
|
||||
|
||||
// the -loadgame option. If this has not been provided, this is -1.
|
||||
extern int startloadgame;
|
||||
|
||||
extern boolean autostart;
|
||||
|
||||
// Selected by user.
|
||||
|
@ -1711,7 +1711,6 @@ static void G_DoLoadGame(void)
|
||||
|
||||
// killough 2/14/98: load compatibility mode
|
||||
compatibility = *save_p++;
|
||||
demo_version = complevel;
|
||||
|
||||
gameskill = *save_p++;
|
||||
gameepisode = *save_p++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user