diff --git a/Content.Server/GameObjects/Components/GUI/HandsComponent.cs b/Content.Server/GameObjects/Components/GUI/HandsComponent.cs index a7c0c49289..6336845970 100644 --- a/Content.Server/GameObjects/Components/GUI/HandsComponent.cs +++ b/Content.Server/GameObjects/Components/GUI/HandsComponent.cs @@ -20,6 +20,7 @@ using Robust.Server.GameObjects.EntitySystemMessages; using Robust.Shared.Containers; using Robust.Shared.GameObjects; using Robust.Shared.GameObjects.Components; +using Robust.Shared.GameObjects.Components.Transform; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.Network; using Robust.Shared.IoC; @@ -571,6 +572,21 @@ namespace Content.Server.GameObjects.Components.GUI } } + private void MoveEvent(MoveEvent moveEvent) + { + if (moveEvent.Sender != Owner) + { + return; + } + + if (!IsPulling) + { + return; + } + + PulledObject!.WakeBody(); + } + public override void HandleMessage(ComponentMessage message, IComponent? component) { base.HandleMessage(message, component); @@ -584,9 +600,13 @@ namespace Content.Server.GameObjects.Components.GUI switch (message) { case PullStartedMessage msg: + Owner.EntityManager.EventBus.SubscribeEvent(EventSource.Local, this, MoveEvent); + AddPullingStatuses(msg.Pulled.Owner); break; case PullStoppedMessage msg: + Owner.EntityManager.EventBus.UnsubscribeEvent(EventSource.Local, this); + RemovePullingStatuses(msg.Pulled.Owner); break; } diff --git a/Content.Shared/Physics/Pull/PullController.cs b/Content.Shared/Physics/Pull/PullController.cs index 02b199a345..8bb76473be 100644 --- a/Content.Shared/Physics/Pull/PullController.cs +++ b/Content.Shared/Physics/Pull/PullController.cs @@ -42,6 +42,8 @@ namespace Content.Shared.Physics.Pull return; } + ControlledComponent.WakeBody(); + var message = new PullStartedMessage(this, _puller, ControlledComponent); _puller.Owner.SendMessage(null, message); @@ -64,6 +66,8 @@ namespace Content.Shared.Physics.Pull return; } + ControlledComponent.WakeBody(); + var message = new PullStoppedMessage(this, oldPuller, ControlledComponent); oldPuller.Owner.SendMessage(null, message); @@ -86,6 +90,8 @@ namespace Content.Shared.Physics.Pull return; } + ControlledComponent.WakeBody(); + var dist = _puller.Owner.Transform.GridPosition.Position - to.Position; if (Math.Sqrt(dist.LengthSquared) > DistBeforeStopPull ||