From 135da071022504a547ea1b765e382012dbd21ce3 Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Sun, 26 Jun 2022 19:25:29 +1000 Subject: [PATCH] Don't allow you to melee attack yourself (#9178) There may be some situations to allow it but in actual combat if you have a big sprite like space dragon it's VERY easy to hit yourself and do sizeable damage. --- Content.Server/Weapon/Melee/MeleeWeaponSystem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Server/Weapon/Melee/MeleeWeaponSystem.cs b/Content.Server/Weapon/Melee/MeleeWeaponSystem.cs index cfb10ba3f0..3a9913217d 100644 --- a/Content.Server/Weapon/Melee/MeleeWeaponSystem.cs +++ b/Content.Server/Weapon/Melee/MeleeWeaponSystem.cs @@ -74,7 +74,7 @@ namespace Content.Server.Weapon.Melee args.Handled = true; var curTime = _gameTiming.CurTime; - if (curTime < comp.CooldownEnd || args.Target == null) + if (curTime < comp.CooldownEnd || args.Target == null || args.Target == owner) return; var location = Transform(args.User).Coordinates;