From aa1728a350b9ebf34e9fba633d8dedad9d033629 Mon Sep 17 00:00:00 2001 From: Lacyway <20912169+Lacyway@users.noreply.github.com> Date: Sat, 8 Jun 2024 19:17:51 +0200 Subject: [PATCH] Only run aggressor handling if it was yourself --- Fika.Core/Coop/Players/ObservedCoopPlayer.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Fika.Core/Coop/Players/ObservedCoopPlayer.cs b/Fika.Core/Coop/Players/ObservedCoopPlayer.cs index 5dd4b7c9..84d50e36 100644 --- a/Fika.Core/Coop/Players/ObservedCoopPlayer.cs +++ b/Fika.Core/Coop/Players/ObservedCoopPlayer.cs @@ -804,6 +804,15 @@ public override void OnDead(EDamageType damageType) base.OnDead(damageType); } + public override void OnBeenKilledByAggressor(IPlayer aggressor, DamageInfo damageInfo, EBodyPart bodyPart, EDamageType lethalDamageType) + { + // Only handle if it was ourselves as otherwise it's irrelevant + if (LastAggressor.IsYourPlayer) + { + base.OnBeenKilledByAggressor(aggressor, damageInfo, bodyPart, lethalDamageType); + } + } + public override void SetupDogTag() { // Do nothing @@ -1432,7 +1441,7 @@ public void SetAggressor(string killerId, string weaponId) if (killer != null) { LastAggressor = killer; - if (killer.IsYourPlayer) + /*if (killer.IsYourPlayer) { Item weapon = FindItem(weaponId); if (weapon != null) @@ -1442,7 +1451,7 @@ public void SetAggressor(string killerId, string weaponId) Weapon = weapon }; } - } + }*/ } }