Victim validation in client_death

Fix #668
This commit is contained in:
voed 2019-01-30 02:03:44 +02:00 committed by GitHub
parent ba083deb1e
commit 57077f49e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -535,9 +535,11 @@ public client_death(killer, victim, wpnindex, hitplace, TK)
}
}
if(is_user_connected(victim))
{
new const CsTeams:team = cs_get_user_team(victim);
if (EnemyRemaining && CS_TEAM_T <= team <= CS_TEAM_CT && is_user_connected(victim))
if (EnemyRemaining && CS_TEAM_T <= team <= CS_TEAM_CT)
{
new const victimTeammatesCount = get_playersnum_ex(GetPlayers_ExcludeDead | GetPlayers_MatchTeam, g_teamsNames[team]);
@ -665,6 +667,7 @@ public client_death(killer, victim, wpnindex, hitplace, TK)
}
}
}
}
if (wpnindex == CSW_KNIFE && (KnifeKill || KnifeKillSound))
{