- Implemented sv_singleplayerrespawn
This commit is contained in:
parent
d804f94a5e
commit
edf2556ea3
4 changed files with 12 additions and 5 deletions
|
|
@ -526,6 +526,8 @@ static bool unloading;
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
EXTERN_CVAR(Bool, sv_singleplayerrespawn)
|
||||
|
||||
void G_ChangeLevel(const char *levelname, int position, int flags, int nextSkill)
|
||||
{
|
||||
level_info_t *nextinfo = NULL;
|
||||
|
|
@ -634,7 +636,7 @@ void G_ChangeLevel(const char *levelname, int position, int flags, int nextSkill
|
|||
|
||||
// If this is co-op, respawn any dead players now so they can
|
||||
// keep their inventory on the next map.
|
||||
if ((multiplayer || level.flags2 & LEVEL2_ALLOWRESPAWN) && !deathmatch && player->playerstate == PST_DEAD)
|
||||
if ((multiplayer || level.flags2 & LEVEL2_ALLOWRESPAWN || sv_singleplayerrespawn) && !deathmatch && player->playerstate == PST_DEAD)
|
||||
{
|
||||
// Copied from the end of P_DeathThink [[
|
||||
player->cls = NULL; // Force a new class if the player is using a random class
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue