Skip to content

Commit

Permalink
fix attempt 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Vaqtincha committed Jun 12, 2021
1 parent b9fe0a1 commit fd6b53a
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions regamedll/dlls/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10124,20 +10124,17 @@ void CBasePlayer::PlayerRespawnThink()
{
#ifdef REGAMEDLL_ADD
if (GetObserverMode() != OBS_NONE && (m_iTeam == UNASSIGNED || m_iTeam == SPECTATOR))
return;

// Player cannot respawn while in the Choose Appearance menu
if (m_iMenu == Menu_ChooseAppearance || m_iJoiningState == SHOWTEAMSELECT)
{
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)
return;

if (pev->deadflag < DEAD_DYING)
return;

Expand Down

0 comments on commit fd6b53a

Please sign in to comment.