bug: forgot to exchange from distance to weight during copy & paste

This commit is contained in:
glax 2023-04-09 17:47:45 +02:00
parent 206f9c5811
commit 6eab23ff16

View File

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