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) {