Items are removed from their parent inventory and their bodies are removed when Item.Remove is called

This commit is contained in:
Regalis
2016-10-12 21:07:19 +03:00
parent 060a1db431
commit 1cdb218fe0
2 changed files with 18 additions and 4 deletions
+6 -1
View File
@@ -378,7 +378,12 @@ namespace Barotrauma.Items.Components
{
base.RemoveComponentSpecific();
GameMain.World.RemoveBody(body.FarseerBody);
if (body != null)
{
body.Remove();
body = null;
}
if (linkedGap!=null) linkedGap.Remove();