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:
@@ -45,6 +45,12 @@ namespace Barotrauma
|
||||
var nodes = new Dictionary<int, PathNode>();
|
||||
foreach (WayPoint wayPoint in wayPoints)
|
||||
{
|
||||
if (wayPoint == null) continue;
|
||||
if (nodes.ContainsKey(wayPoint.ID))
|
||||
{
|
||||
DebugConsole.ThrowError("Error in PathFinder.GenerateNodes (duplicate ID \"" + wayPoint.ID + "\")");
|
||||
continue;
|
||||
}
|
||||
nodes.Add(wayPoint.ID, new PathNode(wayPoint));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user