Fixed docking ports creating duplicate hulls and gaps during loading

This commit is contained in:
Joonas Rikkonen
2018-07-24 13:21:36 +03:00
parent 5e6215a37c
commit 4a8845c604
3 changed files with 23 additions and 15 deletions
@@ -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);
}
}