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.
This commit is contained in:
metalgearsloth
2022-06-26 19:25:29 +10:00
committed by GitHub
parent c4d803c495
commit 135da07102

View File

@@ -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;