added extratime variable
This commit is contained in:
parent
5733b0edb3
commit
9b88996439
@ -30,8 +30,8 @@ public class Pathfinder
|
||||
this.roadPriorityFactor = roadPriorityFactor;
|
||||
this.turnAngle = turnAngle;
|
||||
}
|
||||
|
||||
public Pathfinder AStar(Coordinates startCoordinates, Coordinates goalCoordinates, SpeedType vehicle)
|
||||
|
||||
public Pathfinder AStar(Coordinates startCoordinates, Coordinates goalCoordinates, SpeedType vehicle, double extraTime)
|
||||
{
|
||||
DateTime startCalc = DateTime.Now;
|
||||
_speedType = vehicle;
|
||||
@ -70,7 +70,7 @@ public class Pathfinder
|
||||
Console.WriteLine($"Removed {removed}");*/
|
||||
}
|
||||
|
||||
if (found && DateTime.Now - startCalc > firstFound.Multiply(2))
|
||||
if (found && DateTime.Now - startCalc > firstFound.Multiply(extraTime))
|
||||
stop = true;
|
||||
|
||||
foreach (OsmEdge edge in currentNode.edges)
|
||||
|
Loading…
Reference in New Issue
Block a user