diff --git a/Content.Shared/GameObjects/Components/Pulling/SharedPullableComponent.cs b/Content.Shared/GameObjects/Components/Pulling/SharedPullableComponent.cs index 81eff1c395..d274c03140 100644 --- a/Content.Shared/GameObjects/Components/Pulling/SharedPullableComponent.cs +++ b/Content.Shared/GameObjects/Components/Pulling/SharedPullableComponent.cs @@ -118,12 +118,20 @@ namespace Content.Shared.GameObjects.Components.Pulling public bool TogglePull(IEntity puller) { - if (Puller == null) + if (BeingPulled) { - return TryStartPull(puller); + if (Puller == puller) + { + return TryStopPull(); + } + else + { + TryStopPull(); + return TryStartPull(puller); + } } - return TryStopPull(); + return TryStartPull(puller); } public bool TryMoveTo(EntityCoordinates to) diff --git a/Content.Shared/GameObjects/EntitySystems/SharedPullingSystem.cs b/Content.Shared/GameObjects/EntitySystems/SharedPullingSystem.cs index 2eaf43921a..bc4d2e1f55 100644 --- a/Content.Shared/GameObjects/EntitySystems/SharedPullingSystem.cs +++ b/Content.Shared/GameObjects/EntitySystems/SharedPullingSystem.cs @@ -41,6 +41,12 @@ namespace Content.Shared.GameObjects.EntitySystems private void OnPullStarted(PullStartedMessage message) { + if (_pullers.TryGetValue(message.Puller.Owner, out var pulled) && + pulled.TryGetComponent(out SharedPullableComponent? pulledComponent)) + { + pulledComponent.TryStopPull(); + } + SetPuller(message.Puller.Owner, message.Pulled.Owner); }