From 6eab23ff1653d17432e4e27b8a0aaa49b8ec7fde Mon Sep 17 00:00:00 2001 From: glax Date: Sun, 9 Apr 2023 17:47:45 +0200 Subject: [PATCH] bug: forgot to exchange from distance to weight during copy & paste --- Pathfinding/Pathfinder_Time.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pathfinding/Pathfinder_Time.cs b/Pathfinding/Pathfinder_Time.cs index bd06080..ed9effc 100644 --- a/Pathfinding/Pathfinder_Time.cs +++ b/Pathfinding/Pathfinder_Time.cs @@ -29,7 +29,7 @@ public static partial class Pathfinder OsmNode? neighbor = regionManager.GetNode(edge.neighborId, edge.neighborRegion); if (neighbor is not null) { - double newPotentialWeight = closestNodeToGoal.currentPathLength + + double newPotentialWeight = closestNodeToGoal.currentPathWeight + EdgeWeight(closestNodeToGoal, edge, vehicle, regionManager); if (newPotentialWeight < neighbor.currentPathWeight) {