From be4f19c4bbfed34e852a83c25b67658187409c3e Mon Sep 17 00:00:00 2001 From: glax Date: Thu, 25 Jul 2024 02:26:42 +0200 Subject: [PATCH] Adjust speed if not priority road --- astar/Astar.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/astar/Astar.cs b/astar/Astar.cs index d1cec7f..eef34a6 100644 --- a/astar/Astar.cs +++ b/astar/Astar.cs @@ -109,6 +109,8 @@ namespace astar continue; if(!way.AccessPermitted()) continue; + if (car && !way.IsPriorityRoad()) + speed = (byte)(speed * 0.75f); if(wayId.Value && way.GetDirection() == (fromStart ? WayDirection.Backwards : WayDirection.Forwards) && car) continue;