Docking port fixes again. Closes #551
- Non-saveable entities aren't removed from the linkedTo-list during saving, because that causes gaps to become unlinked with the hulls between docking ports when starting a campaign round. - Hull rechecks are disabled on docking port gaps, because moving linked subs into place may cause the gaps to become unlinked if they're positioned in a certain way (for example in some subs the hulls between the docking ports end up inside the gap). - Dockingports only connect the waypoints linked to their gap to each other, instead of every waypoint that happens to be inside the gap.
This commit is contained in:
@@ -135,13 +135,21 @@ namespace Barotrauma
|
||||
{
|
||||
base.Move(amount);
|
||||
|
||||
FindHulls();
|
||||
if (!DisableHullRechecks) FindHulls();
|
||||
}
|
||||
|
||||
public static void UpdateHulls()
|
||||
{
|
||||
foreach (Gap g in GapList)
|
||||
{
|
||||
for (int i = g.linkedTo.Count - 1; i >= 0; i--)
|
||||
{
|
||||
if (g.linkedTo[i].Removed)
|
||||
{
|
||||
g.linkedTo.RemoveAt(i);
|
||||
}
|
||||
}
|
||||
|
||||
if (g.DisableHullRechecks) continue;
|
||||
g.FindHulls();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user