diff --git a/Barotrauma/BarotraumaClient/Source/GameSession/CrewManager.cs b/Barotrauma/BarotraumaClient/Source/GameSession/CrewManager.cs index 1a7eaf05b..6b9d55aee 100644 --- a/Barotrauma/BarotraumaClient/Source/GameSession/CrewManager.cs +++ b/Barotrauma/BarotraumaClient/Source/GameSession/CrewManager.cs @@ -276,6 +276,9 @@ namespace Barotrauma characterInfos.Add(characterInfo); } + characterInfos.Add(characterInfo); + } + /// /// Remove the character from the crew (and crew menus). /// diff --git a/Barotrauma/BarotraumaShared/Source/Items/Inventory.cs b/Barotrauma/BarotraumaShared/Source/Items/Inventory.cs index 678582ed2..e6e6a9541 100644 --- a/Barotrauma/BarotraumaShared/Source/Items/Inventory.cs +++ b/Barotrauma/BarotraumaShared/Source/Items/Inventory.cs @@ -170,6 +170,13 @@ namespace Barotrauma Inventory prevInventory = item.ParentInventory; + if (createNetworkEvent) + { + CreateNetworkEvent(); + //also delay syncing the inventory the item was inside + if (prevInventory != null && prevInventory != this) prevInventory.syncItemsDelay = 1.0f; + } + if (removeItem) { item.Drop(user); @@ -187,13 +194,6 @@ namespace Barotrauma { item.body.Enabled = false; } - - if (createNetworkEvent) - { - CreateNetworkEvent(); - //also delay syncing the inventory the item was inside - if (prevInventory != null && prevInventory != this) prevInventory.syncItemsDelay = 1.0f; - } } public bool IsEmpty() diff --git a/Barotrauma/BarotraumaShared/Source/Items/Item.cs b/Barotrauma/BarotraumaShared/Source/Items/Item.cs index 35e8db773..cf37c8e41 100644 --- a/Barotrauma/BarotraumaShared/Source/Items/Item.cs +++ b/Barotrauma/BarotraumaShared/Source/Items/Item.cs @@ -1630,21 +1630,25 @@ namespace Barotrauma } } - foreach (ItemComponent ic in components) { ic.Drop(dropper); } + if (body != null) + { + body.Enabled = true; + body.ResetDynamics(); + if (dropper != null) + { + body.SetTransform(dropper.SimPosition, 0.0f); + } + } + foreach (ItemComponent ic in components) { ic.Drop(dropper); } + if (Container != null) { - if (body != null) - { - body.Enabled = true; - body.LinearVelocity = Vector2.Zero; - } SetTransform(Container.SimPosition, 0.0f); - Container.RemoveContained(this); Container = null; } - + if (parentInventory != null) { parentInventory.RemoveItem(this);