From a16c502b79ede35bd7bc3461785ba3fc39e1d900 Mon Sep 17 00:00:00 2001 From: themias <89101928+themias@users.noreply.github.com> Date: Tue, 30 Jul 2024 04:35:30 -0400 Subject: [PATCH] Fix fingerprint transfer on weapon attack (#30257) * Fix fingerprint transfer on weapon attack * Switch to just not raising the event * one more --- Content.Shared/Interaction/SharedInteractionSystem.cs | 6 +++--- Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Content.Shared/Interaction/SharedInteractionSystem.cs b/Content.Shared/Interaction/SharedInteractionSystem.cs index c32b4bcf7809..aca078687a84 100644 --- a/Content.Shared/Interaction/SharedInteractionSystem.cs +++ b/Content.Shared/Interaction/SharedInteractionSystem.cs @@ -952,7 +952,7 @@ public void InteractUsing( RaiseLocalEvent(target, interactUsingEvent, true); DoContactInteraction(user, used, interactUsingEvent); DoContactInteraction(user, target, interactUsingEvent); - DoContactInteraction(used, target, interactUsingEvent); + // Contact interactions are currently only used for forensics, so we don't raise used -> target if (interactUsingEvent.Handled) return; @@ -973,7 +973,7 @@ public void InteractDoAfter(EntityUid user, EntityUid used, EntityUid? target, E if (canReach) { DoContactInteraction(user, target, afterInteractEvent); - DoContactInteraction(used, target, afterInteractEvent); + // Contact interactions are currently only used for forensics, so we don't raise used -> target } if (afterInteractEvent.Handled) @@ -989,7 +989,7 @@ public void InteractDoAfter(EntityUid user, EntityUid used, EntityUid? target, E if (canReach) { DoContactInteraction(user, target, afterInteractUsingEvent); - DoContactInteraction(used, target, afterInteractUsingEvent); + // Contact interactions are currently only used for forensics, so we don't raise used -> target } } diff --git a/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs b/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs index 42b6a3c9c742..72cf4ec550a7 100644 --- a/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs +++ b/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs @@ -485,7 +485,7 @@ protected virtual void DoLightAttack(EntityUid user, LightAttackEvent ev, Entity var weapon = GetEntity(ev.Weapon); - Interaction.DoContactInteraction(weapon, target); + // We skip weapon -> target interaction, as forensics system applies DNA on hit Interaction.DoContactInteraction(user, weapon); // If the user is using a long-range weapon, this probably shouldn't be happening? But I'll interpret melee as a @@ -616,7 +616,7 @@ private bool DoHeavyAttack(EntityUid user, HeavyAttackEvent ev, EntityUid meleeU // For stuff that cares about it being attacked. foreach (var target in targets) { - Interaction.DoContactInteraction(weapon, target); + // We skip weapon -> target interaction, as forensics system applies DNA on hit // If the user is using a long-range weapon, this probably shouldn't be happening? But I'll interpret melee as a // somewhat messy scuffle. See also, light attacks.