(b97c9eb63) Restore the escape velocity condition: don't run to walls.

This commit is contained in:
Joonas Rikkonen
2019-05-16 06:54:31 +03:00
parent 2a1ed98226
commit 4c4cac9c39
17 changed files with 274 additions and 52 deletions
@@ -924,6 +924,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);