Fix laser weapons always hitting yourself.
This commit is contained in:
@@ -90,8 +90,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Hitscan
|
||||
var angle = new Angle(clickLocation.Position - userPosition);
|
||||
|
||||
var ray = new Ray(userPosition, angle.ToVec(), (int)(CollisionGroup.Impassable | CollisionGroup.MobImpassable));
|
||||
var rayCastResults = IoCManager.Resolve<IPhysicsManager>().IntersectRay(ray, MaxLength,
|
||||
Owner.Transform.GetMapTransform().Owner);
|
||||
var rayCastResults = IoCManager.Resolve<IPhysicsManager>().IntersectRay(ray, MaxLength, user);
|
||||
|
||||
Hit(rayCastResults, energyModifier);
|
||||
AfterEffects(user, rayCastResults, angle, energyModifier);
|
||||
|
||||
Reference in New Issue
Block a user