Tiny pulling fixes (#5478)

This commit is contained in:
Clyybber
2021-11-23 14:02:08 +01:00
committed by GitHub
parent 159f84074d
commit 943e46eece
2 changed files with 2 additions and 2 deletions

View File

@@ -71,7 +71,7 @@ namespace Content.Shared.Pulling
public void ForceRelationship(SharedPullerComponent? puller, SharedPullableComponent? pullable) public void ForceRelationship(SharedPullerComponent? puller, SharedPullableComponent? pullable)
{ {
if ((puller != null) && (puller.Pulling == pullable)) if (pullable != null && puller != null && (puller.Pulling == pullable.Owner))
{ {
// Already done // Already done
return; return;

View File

@@ -116,7 +116,7 @@ namespace Content.Shared.Pulling
// The main "start pulling" function. // The main "start pulling" function.
public bool TryStartPull(SharedPullerComponent puller, SharedPullableComponent pullable) public bool TryStartPull(SharedPullerComponent puller, SharedPullableComponent pullable)
{ {
if (puller.Pulling == pullable) if (puller.Pulling == pullable.Owner)
return true; return true;
// Pulling a new object : Perform sanity checks. // Pulling a new object : Perform sanity checks.