Made speedtype any generic.
Will use any connection (highway), and return the same speed for all highways.
This commit is contained in:
@ -9,8 +9,8 @@ public static partial class Pathfinder
|
||||
private static ValueTuple<OsmNode?, OsmNode?> SetupNodes(Coordinates startCoordinates, Coordinates goalCoordinates, RegionManager regionManager )
|
||||
{
|
||||
ValueTuple<OsmNode?, OsmNode?> retTuple = new();
|
||||
retTuple.Item1 = regionManager.ClosestNodeToCoordinates(startCoordinates, Tag.SpeedType.road);
|
||||
retTuple.Item2 = regionManager.ClosestNodeToCoordinates(goalCoordinates, Tag.SpeedType.road);
|
||||
retTuple.Item1 = regionManager.ClosestNodeToCoordinates(startCoordinates, Tag.SpeedType.any);
|
||||
retTuple.Item2 = regionManager.ClosestNodeToCoordinates(goalCoordinates, Tag.SpeedType.any);
|
||||
if (retTuple.Item1 is null || retTuple.Item2 is null)
|
||||
return retTuple;
|
||||
retTuple.Item1.currentPathWeight = 0;
|
||||
|
Reference in New Issue
Block a user