From 3c4b1b85e8af0b08ea97fdf064bbddc13dc76c50 Mon Sep 17 00:00:00 2001 From: glax Date: Thu, 25 Jul 2024 02:23:03 +0200 Subject: [PATCH] return 85% of actual way maxspeed for accuracy --- astar/PathingHelper/SpeedHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/astar/PathingHelper/SpeedHelper.cs b/astar/PathingHelper/SpeedHelper.cs index b619837..f15c757 100644 --- a/astar/PathingHelper/SpeedHelper.cs +++ b/astar/PathingHelper/SpeedHelper.cs @@ -8,7 +8,7 @@ internal static class SpeedHelper { byte maxspeed = way.GetMaxSpeed(); if (maxspeed != 0) - return maxspeed; + return (byte)(maxspeed * 0.85); HighwayType highwayType = way.GetHighwayType(); return car ? SpeedCar[highwayType] : SpeedPedestrian[highwayType]; }