Fixed items disappearing from copypasted containers if the items have been removed from the original container, cloning links between entities

This commit is contained in:
Regalis
2016-11-23 20:34:41 +02:00
parent e39ab10a71
commit b773413b45
2 changed files with 64 additions and 22 deletions
+19
View File
@@ -1983,6 +1983,25 @@ namespace Barotrauma
return true;
}
public override void ShallowRemove()
{
base.ShallowRemove();
Removed = true;
foreach (ItemComponent ic in components)
{
ic.Remove();
}
ItemList.Remove(this);
if (body != null)
{
body.Remove();
body = null;
}
}
public override void Remove()
{
base.Remove();