Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fingerprint transfer on weapon attack #30257

Merged
merged 4 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Content.Shared/Interaction/SharedInteractionSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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)
Expand All @@ -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
}
}

Expand Down
4 changes: 2 additions & 2 deletions Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
Loading