Prevent AI from dropping something that's not in their hands

This commit is contained in:
Víctor Aguilera Puerto
2020-06-18 15:38:40 +02:00
parent a351fad3f6
commit 63acae7937

View File

@@ -21,7 +21,7 @@ namespace Content.Server.AI.Operators.Inventory
/// <returns></returns>
public override Outcome Execute(float frameTime)
{
if (!_owner.TryGetComponent(out HandsComponent handsComponent))
if (!_owner.TryGetComponent(out HandsComponent handsComponent) || handsComponent.FindHand(_entity) == null)
{
return Outcome.Failed;
}