]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix fingerprint transfer on weapon attack (#30257)
authorthemias <89101928+themias@users.noreply.github.com>
Tue, 30 Jul 2024 08:35:30 +0000 (04:35 -0400)
committerGitHub <noreply@github.com>
Tue, 30 Jul 2024 08:35:30 +0000 (18:35 +1000)
* Fix fingerprint transfer on weapon attack

* Switch to just not raising the event

* one more

Content.Shared/Interaction/SharedInteractionSystem.cs
Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs

index c32b4bcf78092473928ecf0d7efe50d5841c35ca..aca078687a845c4691c4e13f27cdd26bc6b696a9 100644 (file)
@@ -952,7 +952,7 @@ namespace Content.Shared.Interaction
             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 @@ namespace Content.Shared.Interaction
             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 @@ namespace Content.Shared.Interaction
             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
             }
         }
 
index 42b6a3c9c742744216e2ee8dcb690d4e4e8b0f85..72cf4ec550a797a4b2802ae976c996c11805bc57 100644 (file)
@@ -485,7 +485,7 @@ public abstract class SharedMeleeWeaponSystem : EntitySystem
 
         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 @@ public abstract class SharedMeleeWeaponSystem : EntitySystem
         // 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.