Compare commits

..

2 Commits

Author SHA1 Message Date
e22a2b69df Corrected Direction of route 2024-07-24 00:23:16 +02:00
304f7b06a9 Add PermissiveAccess Checks 2024-07-24 00:23:06 +02:00

View File

@ -82,10 +82,12 @@ namespace astar
byte speed = SpeedHelper.GetSpeed(way, car);
if(speed < 1)
continue;
if(wayId.Value && way.GetDirection() == (fromStart ? WayDirection.Forwards : WayDirection.Backwards) && car)
if(!way.AccessPermitted())
continue;
if(!wayId.Value && way.GetDirection() == (fromStart ? WayDirection.Backwards : WayDirection.Forwards) && car)
if(wayId.Value && way.GetDirection() == (fromStart ? WayDirection.Backwards : WayDirection.Forwards) && car)
continue;
if(!wayId.Value && way.GetDirection() == (fromStart ? WayDirection.Forwards : WayDirection.Backwards) && car)
continue;
Node neighborNode = graph.Nodes[neighborId];