Skip to content

Commit

Permalink
Fixed assertion check
Browse files Browse the repository at this point in the history
  • Loading branch information
s1lentq committed Dec 13, 2023
1 parent 85e882f commit 806f565
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion regamedll/dlls/multiplay_gamerules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion regamedll/public/regamedll/API/CSPlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 806f565

Please sign in to comment.