- Implemented sv_singleplayerrespawn

This commit is contained in:
Rachael Alexanderson 2016-10-23 06:06:59 -04:00 committed by Christoph Oelckers
commit 043e761eec
4 changed files with 12 additions and 5 deletions

View file

@ -1,4 +1,4 @@
// Emacs style mode select -*- C++ -*-
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
// $Id:$
@ -4495,6 +4495,7 @@ void AActor::AdjustFloorClip ()
// Most of the player structure stays unchanged between levels.
//
EXTERN_CVAR (Bool, chasedemo)
EXTERN_CVAR(Bool, sv_singleplayerrespawn)
extern bool demonew;
@ -4682,7 +4683,7 @@ APlayerPawn *P_SpawnPlayer (FPlayerStart *mthing, int playernum, int flags)
{ // Give all cards in death match mode.
p->mo->GiveDeathmatchInventory ();
}
else if ((multiplayer || (level.flags2 & LEVEL2_ALLOWRESPAWN)) && state == PST_REBORN && oldactor != NULL)
else if ((multiplayer || (level.flags2 & LEVEL2_ALLOWRESPAWN) || sv_singleplayerrespawn) && state == PST_REBORN && oldactor != NULL)
{ // Special inventory handling for respawning in coop
p->mo->FilterCoopRespawnInventory (oldactor);
}