Better AI reachable cleanup (#1507)
Haven't profiled so can't say if it definitely fixes the leak. Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
This commit is contained in:
@@ -36,6 +36,8 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Accessible
|
||||
public HashSet<PathfindingNode> Nodes => _nodes;
|
||||
private HashSet<PathfindingNode> _nodes;
|
||||
|
||||
public bool Deleted { get; private set; }
|
||||
|
||||
public PathfindingRegion(PathfindingNode originNode, HashSet<PathfindingNode> nodes, bool isDoor = false)
|
||||
{
|
||||
OriginNode = originNode;
|
||||
@@ -53,6 +55,8 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Accessible
|
||||
var neighbor = neighbors[i];
|
||||
neighbor.Neighbors.Remove(this);
|
||||
}
|
||||
|
||||
Deleted = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user