diff --git a/regamedll/dlls/multiplay_gamerules.cpp b/regamedll/dlls/multiplay_gamerules.cpp index 4f4899712..6f79f70f6 100644 --- a/regamedll/dlls/multiplay_gamerules.cpp +++ b/regamedll/dlls/multiplay_gamerules.cpp @@ -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)) diff --git a/regamedll/public/regamedll/API/CSPlayer.h b/regamedll/public/regamedll/API/CSPlayer.h index 476b20013..a975bcc9b 100644 --- a/regamedll/public/regamedll/API/CSPlayer.h +++ b/regamedll/public/regamedll/API/CSPlayer.h @@ -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; }