return 85% of actual way maxspeed for accuracy

This commit is contained in:
glax 2024-07-25 02:23:03 +02:00
parent d82efdf973
commit 3c4b1b85e8

View File

@ -8,7 +8,7 @@ internal static class SpeedHelper
{ {
byte maxspeed = way.GetMaxSpeed(); byte maxspeed = way.GetMaxSpeed();
if (maxspeed != 0) if (maxspeed != 0)
return maxspeed; return (byte)(maxspeed * 0.85);
HighwayType highwayType = way.GetHighwayType(); HighwayType highwayType = way.GetHighwayType();
return car ? SpeedCar[highwayType] : SpeedPedestrian[highwayType]; return car ? SpeedCar[highwayType] : SpeedPedestrian[highwayType];
} }