Fixed ItemContainer not setting the position of a contained item when it's placed in the ItemInventory, minor refactoring

This commit is contained in:
Regalis
2017-02-07 20:47:24 +02:00
parent d46207916f
commit e2a872ad90
5 changed files with 10 additions and 31 deletions
+1 -12
View File
@@ -111,18 +111,7 @@ namespace Barotrauma
return true;
}
protected override void DropItem(Item item)
{
bool enabled = item.body!=null && item.body.Enabled;
item.Drop(character);
if (!enabled)
{
item.SetTransform(character.SimPosition, 0.0f);
}
}
public int FindLimbSlot(InvSlotType limbSlot)
{
for (int i = 0; i < Items.Length; i++)