Skip to content

Commit

Permalink
Reset damage stats on Putin Server
Browse files Browse the repository at this point in the history
  • Loading branch information
s1lentq committed Jan 12, 2024
1 parent c0f4794 commit 02a0516
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion regamedll/dlls/API/CSPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ EXT_FUNC bool CCSPlayer::RemovePlayerItemEx(const char* pszItemName, bool bRemov

if (pItem == pPlayer->m_pActiveItem) {
((CBasePlayerWeapon *)pItem)->RetireWeapon();

if (pItem->CanHolster() && pItem != pPlayer->m_pActiveItem && !(pPlayer->pev->weapons &(1 << pItem->m_iId))) {
return true;
}
Expand Down Expand Up @@ -561,6 +561,8 @@ void CCSPlayer::ResetAllStats()
m_iNumKilledByUnanswered[i] = 0;
m_bPlayerDominated[i] = false;
}

m_DamageList.Clear();
}

void CCSPlayer::OnSpawn()
Expand Down Expand Up @@ -589,6 +591,7 @@ void CCSPlayer::OnKilled()
void CCSPlayer::OnConnect()
{
ResetVars();
ResetAllStats();
m_iUserID = GETPLAYERUSERID(BasePlayer()->edict());
}

Expand Down

0 comments on commit 02a0516

Please sign in to comment.