Fixed docking ports creating duplicate hulls and gaps during loading
This commit is contained in:
@@ -1232,7 +1232,16 @@ namespace Barotrauma
|
||||
|
||||
foreach (MapEntity e in MapEntity.mapEntityList)
|
||||
{
|
||||
if (e.MoveWithLevel || e.Submarine != this) continue;
|
||||
if (e.linkedTo == null) continue;
|
||||
for (int i = e.linkedTo.Count - 1; i >= 0; i--)
|
||||
{
|
||||
if (!e.linkedTo[i].ShouldBeSaved) e.linkedTo.RemoveAt(i);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (MapEntity e in MapEntity.mapEntityList)
|
||||
{
|
||||
if (e.MoveWithLevel || e.Submarine != this || !e.ShouldBeSaved) continue;
|
||||
e.Save(element);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user