do not overwrite vehicle maxspeed with higher value, fixes #6979

This commit is contained in:
Frederik Ramm 2024-09-26 12:02:44 +02:00
parent 203314b1aa
commit 6cc6337781

View File

@ -438,11 +438,11 @@ function WayHandlers.maxspeed(profile,way,result,data)
backward = WayHandlers.parse_maxspeed(backward,profile) backward = WayHandlers.parse_maxspeed(backward,profile)
if forward and forward > 0 then 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 end
if backward and backward > 0 then 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
end end