Fix laser weapons always hitting yourself.

This commit is contained in:
Pieter-Jan Briers
2020-01-09 00:15:48 +01:00
parent f73824adcb
commit 39d99485eb

View File

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