From e0f429c59b4037c5f1edb0759dfd5834ae522e54 Mon Sep 17 00:00:00 2001 From: DrSmugleaf Date: Wed, 29 Jul 2020 13:32:02 +0200 Subject: [PATCH] Fix being able to pull entities outside of your container (#1533) --- .../GameObjects/Components/GUI/HandsComponent.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Content.Server/GameObjects/Components/GUI/HandsComponent.cs b/Content.Server/GameObjects/Components/GUI/HandsComponent.cs index a39f6ba8ec..3797aa51a6 100644 --- a/Content.Server/GameObjects/Components/GUI/HandsComponent.cs +++ b/Content.Server/GameObjects/Components/GUI/HandsComponent.cs @@ -502,6 +502,17 @@ namespace Content.Server.GameObjects.Components.GUI return; } + var isOwnerContained = ContainerHelpers.TryGetContainer(Owner, out var ownerContainer); + var isPullableContained = ContainerHelpers.TryGetContainer(pullable.Owner, out var pullableContainer); + + if (isOwnerContained || isPullableContained) + { + if (ownerContainer != pullableContainer) + { + return; + } + } + if (IsPulling) { StopPull();