bug: forgot to exchange from distance to weight during copy & paste
This commit is contained in:
parent
206f9c5811
commit
6eab23ff16
@ -29,7 +29,7 @@ public static partial class Pathfinder
|
|||||||
OsmNode? neighbor = regionManager.GetNode(edge.neighborId, edge.neighborRegion);
|
OsmNode? neighbor = regionManager.GetNode(edge.neighborId, edge.neighborRegion);
|
||||||
if (neighbor is not null)
|
if (neighbor is not null)
|
||||||
{
|
{
|
||||||
double newPotentialWeight = closestNodeToGoal.currentPathLength +
|
double newPotentialWeight = closestNodeToGoal.currentPathWeight +
|
||||||
EdgeWeight(closestNodeToGoal, edge, vehicle, regionManager);
|
EdgeWeight(closestNodeToGoal, edge, vehicle, regionManager);
|
||||||
if (newPotentialWeight < neighbor.currentPathWeight)
|
if (newPotentialWeight < neighbor.currentPathWeight)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user