From e22a2b69df24930e749c6d46eed09dafeb10c8d5 Mon Sep 17 00:00:00 2001 From: glax Date: Wed, 24 Jul 2024 00:23:16 +0200 Subject: [PATCH] Corrected Direction of route --- astar/Astar.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/astar/Astar.cs b/astar/Astar.cs index 9e665bb..398f9df 100644 --- a/astar/Astar.cs +++ b/astar/Astar.cs @@ -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];