(935f68e00) Fix characters waiting when they shouldn't after being left uncontrolled by the player.

This commit is contained in:
Joonas Rikkonen
2019-05-16 06:57:50 +03:00
parent b97ecddf03
commit 3fc539d373
11 changed files with 137 additions and 695 deletions
@@ -601,6 +601,25 @@ namespace Barotrauma.Items.Components
}
}
if (targetItem.Prefab.DeconstructItems.Any())
{
inputContainer.Inventory.RemoveItem(targetItem);
Entity.Spawner.AddToRemoveQueue(targetItem);
MoveInputQueue();
PutItemsToLinkedContainer();
}
else
{
if (outputContainer.Inventory.Items.All(i => i != null))
{
targetItem.Drop(dropper: null);
}
else
{
outputContainer.Inventory.TryPutItem(targetItem, user: null, createNetworkEvent: true);
}
}
if (targetItem.Prefab.DeconstructItems.Any())
{
inputContainer.Inventory.RemoveItem(targetItem);