diff --git a/Content.Server/GameObjects/Components/Items/Storage/ItemComponent.cs b/Content.Server/GameObjects/Components/Items/Storage/ItemComponent.cs index bed816133f..b1c5648e07 100644 --- a/Content.Server/GameObjects/Components/Items/Storage/ItemComponent.cs +++ b/Content.Server/GameObjects/Components/Items/Storage/ItemComponent.cs @@ -156,7 +156,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage break; } - ThrowHelper.Throw(Owner, throwForce, targetLocation, sourceLocation, true); + Owner.Throw(throwForce, targetLocation, sourceLocation, true); } } } diff --git a/Content.Server/GameObjects/EntitySystems/HandsSystem.cs b/Content.Server/GameObjects/EntitySystems/HandsSystem.cs index 1ec5de0688..d78b98ed1e 100644 --- a/Content.Server/GameObjects/EntitySystems/HandsSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/HandsSystem.cs @@ -174,7 +174,7 @@ namespace Content.Server.GameObjects.EntitySystems newStackComp.Count = 1; } - ThrowHelper.ThrowTo(throwEnt, ThrowForce, coords, plyEnt.Transform.Coordinates, false, plyEnt); + throwEnt.ThrowTo(ThrowForce, coords, plyEnt.Transform.Coordinates, false, plyEnt); return true; } @@ -249,7 +249,7 @@ namespace Content.Server.GameObjects.EntitySystems { if (!TryGetAttachedComponent(session as IPlayerSession, out HandsComponent handsComp)) return; - + handsComp.StopPull(); } diff --git a/Content.Server/Throw/ThrowHelper.cs b/Content.Server/Throw/ThrowHelper.cs index 52c3f8419a..8e7db8b7c1 100644 --- a/Content.Server/Throw/ThrowHelper.cs +++ b/Content.Server/Throw/ThrowHelper.cs @@ -39,7 +39,7 @@ namespace Content.Server.Throw /// /// The entity that did the throwing. An opposite impulse will be applied to this entity if passed in. /// - public static void Throw(IEntity thrownEnt, float throwForce, EntityCoordinates targetLoc, EntityCoordinates sourceLoc, bool spread = false, IEntity throwSourceEnt = null) + public static void Throw(this IEntity thrownEnt, float throwForce, EntityCoordinates targetLoc, EntityCoordinates sourceLoc, bool spread = false, IEntity throwSourceEnt = null) { if (!thrownEnt.TryGetComponent(out IPhysicsComponent colComp)) return; @@ -125,7 +125,7 @@ namespace Content.Server.Throw /// /// The entity that did the throwing. An opposite impulse will be applied to this entity if passed in. /// - public static void ThrowTo(IEntity thrownEnt, float throwForceMax, EntityCoordinates targetLoc, + public static void ThrowTo(this IEntity thrownEnt, float throwForceMax, EntityCoordinates targetLoc, EntityCoordinates sourceLoc, bool spread = false, IEntity throwSourceEnt = null) { var entityManager = IoCManager.Resolve(); @@ -149,7 +149,7 @@ namespace Content.Server.Throw var forceNecessary = impulseNecessary * (1f / timing.TickRate); // Then clamp it to the max force allowed and call Throw(). - Throw(thrownEnt, MathF.Min(forceNecessary, throwForceMax), targetLoc, sourceLoc, spread, throwSourceEnt); + thrownEnt.Throw(MathF.Min(forceNecessary, throwForceMax), targetLoc, sourceLoc, spread, throwSourceEnt); } } }