]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
[Combat] Let people melee attack themselves (#15272)
authorKara <lunarautomaton6@gmail.com>
Mon, 10 Apr 2023 21:28:27 +0000 (14:28 -0700)
committerGitHub <noreply@github.com>
Mon, 10 Apr 2023 21:28:27 +0000 (15:28 -0600)
Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs

index bd3fa842b4376dafb88547baf4a46d525fc4ed8e..a2334ba73e4d97fe2d968516c5fd216341f32d6c 100644 (file)
@@ -418,10 +418,8 @@ public abstract class SharedMeleeWeaponSystem : EntitySystem
     {
         var damage = component.Damage * GetModifier(component, true);
 
-        // Can't attack yourself
         // For consistency with wide attacks stuff needs damageable.
-        if (user == ev.Target ||
-            Deleted(ev.Target) ||
+        if (Deleted(ev.Target) ||
             !HasComp<DamageableComponent>(ev.Target) ||
             !TryComp<TransformComponent>(ev.Target, out var targetXform) ||
             // Not in LOS.