Fixed door gaps being removed twice when unloading a sub (in door.Remove and Entity.RemoveAll). Probably didn't cause any issues other than unnecessary console warnings.
This commit is contained in:
@@ -334,9 +334,13 @@ namespace Barotrauma.Items.Components
|
||||
body.Remove();
|
||||
body = null;
|
||||
}
|
||||
|
||||
|
||||
if (linkedGap != null) linkedGap.Remove();
|
||||
|
||||
//no need to remove the gap if we're unloading the whole submarine
|
||||
//otherwise the gap will be removed twice and cause console warnings
|
||||
if (!Submarine.Unloading)
|
||||
{
|
||||
if (linkedGap != null) linkedGap.Remove();
|
||||
}
|
||||
|
||||
doorSprite.Remove();
|
||||
if (weldedSprite != null) weldedSprite.Remove();
|
||||
|
||||
Reference in New Issue
Block a user