diff --git a/Barotrauma/BarotraumaShared/Source/Items/Components/Door.cs b/Barotrauma/BarotraumaShared/Source/Items/Components/Door.cs index c86ce633a..9a97d444a 100644 --- a/Barotrauma/BarotraumaShared/Source/Items/Components/Door.cs +++ b/Barotrauma/BarotraumaShared/Source/Items/Components/Door.cs @@ -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();