From 8706cc5a10c7b06f9da96a24609e11b406a3c15d Mon Sep 17 00:00:00 2001 From: s1lentq Date: Thu, 9 May 2024 00:30:57 +0700 Subject: [PATCH] KillRarity Domination: Don't consider suicides to be unanswered killing --- regamedll/dlls/multiplay_gamerules.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/regamedll/dlls/multiplay_gamerules.cpp b/regamedll/dlls/multiplay_gamerules.cpp index 53501ac0..ba71bceb 100644 --- a/regamedll/dlls/multiplay_gamerules.cpp +++ b/regamedll/dlls/multiplay_gamerules.cpp @@ -5291,13 +5291,12 @@ int CHalfLifeMultiplay::GetRarityOfKill(CBaseEntity *pKiller, CBasePlayer *pVict iRarity |= KILLRARITY_HEADSHOT; CBasePlayer *pKillerPlayer = static_cast(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)