Hulls, gaps, structures & waypoints implement ShallowRemove (= a method that's used to remove entities without severing links between them when copypasting).
Copied waypoints used to stay in the waypoint list, causing an exception to be thrown in PathFinder.GenerateNodes due to duplicate IDs.
This commit is contained in:
@@ -670,19 +670,27 @@ namespace Barotrauma
|
||||
return null;
|
||||
}
|
||||
|
||||
public override void Remove()
|
||||
public override void ShallowRemove()
|
||||
{
|
||||
base.Remove();
|
||||
|
||||
base.ShallowRemove();
|
||||
GapList.Remove(this);
|
||||
|
||||
foreach (Hull hull in Hull.hullList)
|
||||
{
|
||||
hull.ConnectedGaps.Remove(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public override void Remove()
|
||||
{
|
||||
base.Remove();
|
||||
GapList.Remove(this);
|
||||
|
||||
foreach (Hull hull in Hull.hullList)
|
||||
{
|
||||
hull.ConnectedGaps.Remove(this);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnMapLoaded()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user