diff --git a/CHANGELOG.md b/CHANGELOG.md index fddc909d92c..db9f8ce6d6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -85,6 +85,7 @@ - FIXED: Remove unused C++ headers [#7105](https://github.com/Project-OSRM/osrm-backend/pull/7105) - Profiles: - FIXED: Bicycle and foot profiles now don't route on proposed ways [#6615](https://github.com/Project-OSRM/osrm-backend/pull/6615) + - FIXED: edge maxspeed now doesn't overwrite a vehicle maxspeed [#7036](https://github.com/Project-OSRM/osrm-backend/pull/7036) - ADDED: Add optional support of cargo bike exclusion and width to bicyle profile [#7044](https://github.com/Project-OSRM/osrm-backend/pull/7044) - Routing: - FIXED: Fix adding traffic signal penalties during compression [#6419](https://github.com/Project-OSRM/osrm-backend/pull/6419) diff --git a/profiles/lib/way_handlers.lua b/profiles/lib/way_handlers.lua index b1341023509..87b4b6e2cc1 100644 --- a/profiles/lib/way_handlers.lua +++ b/profiles/lib/way_handlers.lua @@ -438,11 +438,11 @@ function WayHandlers.maxspeed(profile,way,result,data) backward = WayHandlers.parse_maxspeed(backward,profile) if forward and forward > 0 then - result.forward_speed = forward * profile.speed_reduction + result.forward_speed = math.min(forward * profile.speed_reduction, result.forward_speed) end if backward and backward > 0 then - result.backward_speed = backward * profile.speed_reduction + result.backward_speed = math.min(backward * profile.speed_reduction, result.backward_speed) end end