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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user