From 943e46eece4fadca6a5178a80ddf541232a9ea39 Mon Sep 17 00:00:00 2001 From: Clyybber Date: Tue, 23 Nov 2021 14:02:08 +0100 Subject: [PATCH] Tiny pulling fixes (#5478) --- .../Pulling/Systems/SharedPullingStateManagementSystem.cs | 2 +- Content.Shared/Pulling/Systems/SharedPullingSystem.Actions.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Content.Shared/Pulling/Systems/SharedPullingStateManagementSystem.cs b/Content.Shared/Pulling/Systems/SharedPullingStateManagementSystem.cs index 6f008d69e5..ca550ac1ac 100644 --- a/Content.Shared/Pulling/Systems/SharedPullingStateManagementSystem.cs +++ b/Content.Shared/Pulling/Systems/SharedPullingStateManagementSystem.cs @@ -71,7 +71,7 @@ namespace Content.Shared.Pulling public void ForceRelationship(SharedPullerComponent? puller, SharedPullableComponent? pullable) { - if ((puller != null) && (puller.Pulling == pullable)) + if (pullable != null && puller != null && (puller.Pulling == pullable.Owner)) { // Already done return; diff --git a/Content.Shared/Pulling/Systems/SharedPullingSystem.Actions.cs b/Content.Shared/Pulling/Systems/SharedPullingSystem.Actions.cs index 9a8faf4a8e..b7e56a6442 100644 --- a/Content.Shared/Pulling/Systems/SharedPullingSystem.Actions.cs +++ b/Content.Shared/Pulling/Systems/SharedPullingSystem.Actions.cs @@ -116,7 +116,7 @@ namespace Content.Shared.Pulling // The main "start pulling" function. public bool TryStartPull(SharedPullerComponent puller, SharedPullableComponent pullable) { - if (puller.Pulling == pullable) + if (puller.Pulling == pullable.Owner) return true; // Pulling a new object : Perform sanity checks.