Fixed assertion check

This commit is contained in:
s1lentq 2023-12-13 20:01:12 +07:00
parent 85e882f4db
commit 806f5651de
2 changed files with 2 additions and 2 deletions

View File

@ -5276,7 +5276,7 @@ int CHalfLifeMultiplay::GetRarityOfKill(CBaseEntity *pKiller, CBasePlayer *pVict
// That is done so that the domination and revenge will be calculated prior
// to the death message being sent to the clients
int iAttackerEntityIndex = pKillerPlayer->entindex();
assert(iAttackerEntityIndex >= 0 && iAttackerEntityIndex < MAX_CLIENTS);
assert(iAttackerEntityIndex > 0 && iAttackerEntityIndex <= MAX_CLIENTS);
int iKillsUnanswered = pVictim->CSPlayer()->m_iNumKilledByUnanswered[iAttackerEntityIndex - 1] + 1;
if (iKillsUnanswered == CS_KILLS_FOR_DOMINATION || pKillerPlayer->CSPlayer()->IsPlayerDominated(pVictim->entindex() - 1))

View File

@ -207,6 +207,6 @@ inline bool CCSPlayer::IsPlayerDominated(int iPlayerIndex) const
inline void CCSPlayer::SetPlayerDominated(CBasePlayer *pPlayer, bool bDominated)
{
int iPlayerIndex = pPlayer->entindex();
assert(iPlayerIndex >= 0 && iPlayerIndex < MAX_CLIENTS);
assert(iPlayerIndex > 0 && iPlayerIndex <= MAX_CLIENTS);
m_bPlayerDominated[iPlayerIndex - 1] = bDominated;
}