diff --git a/Source/d_main.c b/Source/d_main.c index 6b3a167b..e5d6f406 100644 --- a/Source/d_main.c +++ b/Source/d_main.c @@ -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")) diff --git a/Source/d_main.h b/Source/d_main.h index 21f42900..e032eef9 100644 --- a/Source/d_main.h +++ b/Source/d_main.h @@ -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; diff --git a/Source/g_game.c b/Source/g_game.c index 0d18230d..bc934b93 100644 --- a/Source/g_game.c +++ b/Source/g_game.c @@ -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;