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:
@@ -335,8 +335,12 @@ namespace Barotrauma.Items.Components
|
|||||||
body = null;
|
body = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//no need to remove the gap if we're unloading the whole submarine
|
||||||
if (linkedGap != null) linkedGap.Remove();
|
//otherwise the gap will be removed twice and cause console warnings
|
||||||
|
if (!Submarine.Unloading)
|
||||||
|
{
|
||||||
|
if (linkedGap != null) linkedGap.Remove();
|
||||||
|
}
|
||||||
|
|
||||||
doorSprite.Remove();
|
doorSprite.Remove();
|
||||||
if (weldedSprite != null) weldedSprite.Remove();
|
if (weldedSprite != null) weldedSprite.Remove();
|
||||||
|
|||||||
Reference in New Issue
Block a user