Skip to content

Commit

Permalink
KillRarity Domination: Don't consider suicides to be unanswered killing
Browse files Browse the repository at this point in the history
  • Loading branch information
s1lentq committed May 8, 2024
1 parent cabdc25 commit 8706cc5
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions regamedll/dlls/multiplay_gamerules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5291,13 +5291,12 @@ int CHalfLifeMultiplay::GetRarityOfKill(CBaseEntity *pKiller, CBasePlayer *pVict
iRarity |= KILLRARITY_HEADSHOT;

CBasePlayer *pKillerPlayer = static_cast<CBasePlayer *>(pKiller);
if (pKillerPlayer && pKillerPlayer->IsPlayer())
if (pKillerPlayer && pKillerPlayer->IsPlayer() && pKillerPlayer != pVictim)
{
WeaponClassType weaponClass = AliasToWeaponClass(killerWeaponName);
if (pKillerPlayer != pVictim
&& weaponClass != WEAPONCLASS_NONE
&& weaponClass != WEAPONCLASS_KNIFE
&& weaponClass != WEAPONCLASS_GRENADE)
if (weaponClass != WEAPONCLASS_NONE &&
weaponClass != WEAPONCLASS_KNIFE &&
weaponClass != WEAPONCLASS_GRENADE)
{
// The killer player kills the victim through the walls
if (pVictim->GetDmgPenetrationLevel() > 0)
Expand Down

0 comments on commit 8706cc5

Please sign in to comment.