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 angle = new Angle(clickLocation.Position - userPosition);
|
||||||
|
|
||||||
var ray = new Ray(userPosition, angle.ToVec(), (int)(CollisionGroup.Impassable | CollisionGroup.MobImpassable));
|
var ray = new Ray(userPosition, angle.ToVec(), (int)(CollisionGroup.Impassable | CollisionGroup.MobImpassable));
|
||||||
var rayCastResults = IoCManager.Resolve<IPhysicsManager>().IntersectRay(ray, MaxLength,
|
var rayCastResults = IoCManager.Resolve<IPhysicsManager>().IntersectRay(ray, MaxLength, user);
|
||||||
Owner.Transform.GetMapTransform().Owner);
|
|
||||||
|
|
||||||
Hit(rayCastResults, energyModifier);
|
Hit(rayCastResults, energyModifier);
|
||||||
AfterEffects(user, rayCastResults, angle, energyModifier);
|
AfterEffects(user, rayCastResults, angle, energyModifier);
|
||||||
|
|||||||
Reference in New Issue
Block a user