From cb2510a2a18539ed6d413e04fd6d1d907f2a2252 Mon Sep 17 00:00:00 2001 From: glax Date: Mon, 29 Jul 2024 01:31:50 +0200 Subject: [PATCH] Remove additional calls to ExploreSide --- astar/Astar.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/astar/Astar.cs b/astar/Astar.cs index c72da5f..c06eaab 100644 --- a/astar/Astar.cs +++ b/astar/Astar.cs @@ -52,8 +52,6 @@ namespace astar for(int i = 0; i < Math.Min(toVisitStart.Count * 0.5, 50) && meetingEnds is null; i++) meetingEnds = ExploreSide(true, graph, toVisitStart, rl, priorityHelper, closestEndNode, car, DefaultPriorityWeights, pathing, logger); } - if(meetingEnds is null) - meetingEnds = ExploreSide(true, graph, toVisitStart, rl, priorityHelper, closestEndNode, car, DefaultPriorityWeights, pathing, logger); ulong closestStartNodeId = toVisitStart.UnorderedItems .MinBy(n => graph.Nodes[n.Element].DistanceTo(endNode.Value)).Element; @@ -63,8 +61,6 @@ namespace astar for(int i = 0; i < Math.Min(toVisitEnd.Count * 0.5, 50) && meetingEnds is null; i++) meetingEnds = ExploreSide(false, graph, toVisitEnd, rl, priorityHelper, closestStartNode, car, DefaultPriorityWeights, pathing, logger); } - if(meetingEnds is null) - meetingEnds = ExploreSide(false, graph, toVisitEnd, rl, priorityHelper, closestStartNode, car, DefaultPriorityWeights, pathing, logger); if (meetingEnds is not null) break;