- 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

@ -1655,9 +1655,10 @@ static void G_QueueBody (AActor *body)
//
// G_DoReborn
//
EXTERN_CVAR(Bool, sv_singleplayerrespawn)
void G_DoReborn (int playernum, bool freshbot)
{
if (!multiplayer && !(level.flags2 & LEVEL2_ALLOWRESPAWN))
if (!multiplayer && !(level.flags2 & LEVEL2_ALLOWRESPAWN) && !sv_singleplayerrespawn)
{
if (BackupSaveName.Len() > 0 && FileExists (BackupSaveName.GetChars()))
{ // Load game from the last point it was saved