Add pistolstart command line option (#119)

This commit is contained in:
Roman Fomin 2021-01-30 23:10:03 +07:00 committed by GitHub
parent c2fde4f938
commit 342d445641
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 0 deletions

View File

@ -103,6 +103,7 @@ boolean clfastparm; // checkparm of -fast
boolean nomonsters; // working -nomonsters
boolean respawnparm; // working -respawn
boolean fastparm; // working -fast
boolean pistolstart; // working -pistolstart
boolean singletics = false; // debug flag to cancel adaptiveness
@ -1505,6 +1506,8 @@ void D_DoomMain(void)
fastparm = clfastparm = M_CheckParm ("-fast");
// jff 1/24/98 end of set to both working and command line value
pistolstart = M_CheckParm ("-pistolstart");
devparm = M_CheckParm ("-devparm");
if (M_CheckParm ("-altdeath"))

View File

@ -48,6 +48,8 @@ extern boolean clrespawnparm; // checkparm of -respawn
extern boolean clfastparm; // checkparm of -fast
//jff end of external declaration of command line playmode
extern boolean pistolstart;
extern boolean nosfxparm;
extern boolean nomusicparm;

View File

@ -694,6 +694,28 @@ static void G_DoLoadLevel(void)
headsecnode = NULL;
}
// [crispy] pistol start
if (pistolstart)
{
if (!netgame)
{
G_PlayerReborn(0);
}
else if ((demoplayback || netdemo) && !singledemo)
{
// no-op - silently ignore pistolstart when playing demo from the
// demo reel
}
else
{
const char message[] = "The -pistolstart option is not supported"
" for demos and\n"
" network play.";
if (!demo_p) demorecording = false;
I_Error(message);
}
}
P_SetupLevel (gameepisode, gamemap, 0, gameskill);
displayplayer = consoleplayer; // view the guy you are playing
gameaction = ga_nothing;