Skip to content

Commit f0eb321

Browse files
committed
Server: Add mp_respawn_delay cvar
1 parent 361f78d commit f0eb321

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

src/game/server/game.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ cvar_t mp_notify_player_status = { "mp_notify_player_status", "7" }; // Notifica
6262
ConVar mp_welcomecam("mp_welcomecam", "1", 0, "Don't spawn players immediately on join");
6363
ConVar mp_welcomecam_delay("mp_welcomecam_delay", "0.2", 0, "Delay before the player can leave welcome cam");
6464
ConVar mp_respawn_fix("mp_respawn_fix", "1", 0, "Fix inconsistent respawn times and standing corpses");
65+
ConVar mp_respawn_delay("mp_respawn_delay", "1.5", 0, "Time until palyers can respawn after death. Requires mp_respawn_fix 1.");
6566

6667
cvar_t motdfile_unicode = { "motdfile_unicode", "motd_unicode.txt", FCVAR_SERVER };
6768
cvar_t motdfile_html = { "motdfile_html", "motd.html", FCVAR_SERVER };

src/game/server/game.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ extern cvar_t mp_notify_player_status;
4747
extern ConVar mp_welcomecam;
4848
extern ConVar mp_welcomecam_delay;
4949
extern ConVar mp_respawn_fix;
50+
extern ConVar mp_respawn_delay;
5051
extern ConVar mp_wallgauss;
5152
extern ConVar mp_rpg_fix;
5253
extern ConVar mp_blastradius;

src/game/server/player.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1423,7 +1423,7 @@ void CBasePlayer::PlayerDeathThink(void)
14231423
{
14241424
// BHL behavior: wait for fixed time
14251425
// time given to animate corpse and don't allow to respawn till this time ends
1426-
if (gpGlobals->time < m_flDeathAnimationStartTime + 1.5)
1426+
if (gpGlobals->time < m_flDeathAnimationStartTime + mp_respawn_delay.GetFloat())
14271427
return;
14281428
}
14291429

0 commit comments

Comments
 (0)