Corrected Direction of route

This commit is contained in:
glax 2024-07-24 00:23:16 +02:00
parent 304f7b06a9
commit e22a2b69df

View File

@ -85,9 +85,9 @@ namespace astar
if(!way.AccessPermitted())
continue;
if(wayId.Value && way.GetDirection() == (fromStart ? WayDirection.Forwards : WayDirection.Backwards) && car)
if(wayId.Value && way.GetDirection() == (fromStart ? WayDirection.Backwards : WayDirection.Forwards) && car)
continue;
if(!wayId.Value && way.GetDirection() == (fromStart ? WayDirection.Backwards : WayDirection.Forwards) && car)
if(!wayId.Value && way.GetDirection() == (fromStart ? WayDirection.Forwards : WayDirection.Backwards) && car)
continue;
Node neighborNode = graph.Nodes[neighborId];