Skip to content

Commit

Permalink
reset RespawnPending for spectators (fix 3rd party plugins)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vaqtincha committed Jun 12, 2021
1 parent 2c52c4f commit b9fe0a1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions regamedll/dlls/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10124,7 +10124,15 @@ void CBasePlayer::PlayerRespawnThink()
{
#ifdef REGAMEDLL_ADD
if (GetObserverMode() != OBS_NONE && (m_iTeam == UNASSIGNED || m_iTeam == SPECTATOR))
{
if (CSPlayer()->m_flRespawnPending > 0)
{
CSPlayer()->m_flRespawnPending = 0.0f;
CSPlayer()->m_bGameForcingRespawn = false;
}

return;
}

// Player cannot respawn while in the Choose Appearance menu
if (m_iMenu == Menu_ChooseAppearance || m_iJoiningState == SHOWTEAMSELECT)
Expand Down

0 comments on commit b9fe0a1

Please sign in to comment.