Fix wide attacking in containers (#8886)

This commit is contained in:
Kara
2022-06-16 03:59:13 -07:00
committed by GitHub
parent da2394da3c
commit 1e5639ef1b

View File

@@ -197,6 +197,12 @@ namespace Content.Server.Interaction
if (!unobstructed)
return;
}
else if (ContainerSystem.IsEntityInContainer(user))
{
// No wide attacking while in containers (holos, lockers, etc).
// Can't think of a valid case where you would want this.
return;
}
// Verify user has a hand, and find what object they are currently holding in their active hand
if (TryComp(user, out HandsComponent? hands))