Skip to content

Commit

Permalink
Fix assistance count
Browse files Browse the repository at this point in the history
  • Loading branch information
SmileYzn committed Aug 12, 2023
1 parent f6b4184 commit fa67f42
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions MatchStats/MatchStats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,13 +403,16 @@ void CMatchStats::PlayerKilled(CBasePlayer* Victim, entvars_t* pevKiller, entvar
{
if (Player->m_iTeam == TERRORIST || Player->m_iTeam == CT)
{
auto Auth = gMatchUtil.GetAuthId(Player);

if (Auth)
if (Player->entindex() != KillerIndex)
{
if (this->m_Player[Auth].Round.PlayerDamage[VictimAuth] >= static_cast<int>(this->m_assistance_dmg->value))
auto Auth = gMatchUtil.GetAuthId(Player);

if (Auth)
{
this->m_Player[Auth].Stats[this->m_State].Assists++;
if (this->m_Player[Auth].Round.PlayerDamage[VictimAuth] >= (int)(this->m_assistance_dmg->value))
{
this->m_Player[Auth].Stats[this->m_State].Assists++;
}
}
}
}
Expand Down

0 comments on commit fa67f42

Please sign in to comment.