Merge branch 'master' into new-netcode

Conflicts:
	Subsurface/Source/Items/CharacterInventory.cs
	Subsurface/Source/Items/Inventory.cs
	Subsurface/Source/Items/Item.cs
This commit is contained in:
Regalis
2016-10-12 21:12:21 +03:00
9 changed files with 89 additions and 19 deletions
+14 -5
View File
@@ -1770,14 +1770,17 @@ namespace Barotrauma
int index = components.IndexOf(ic);
}
public override void Remove()
public override void Remove()
{
base.Remove();
Removed = true;
//sprite.Remove();
//if (body != null) body.Remove();
if (parentInventory != null)
{
parentInventory.RemoveItem(this);
parentInventory = null;
}
foreach (ItemComponent ic in components)
{
@@ -1785,14 +1788,20 @@ namespace Barotrauma
}
ItemList.Remove(this);
if (body != null)
{
body.Remove();
body = null;
}
foreach (Item it in ItemList)
{
if (it.linkedTo.Contains(this))
{
it.linkedTo.Remove(this);
}
}
}
}
}
}
}