Fix being able to pull entities outside of your container (#1533)

This commit is contained in:
DrSmugleaf
2020-07-29 13:32:02 +02:00
committed by GitHub
parent 3cd5d7ba3b
commit e0f429c59b

View File

@@ -502,6 +502,17 @@ namespace Content.Server.GameObjects.Components.GUI
return; 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) if (IsPulling)
{ {
StopPull(); StopPull();