do not overwrite vehicle maxspeed with higher value, fixes #6979
This commit is contained in:
parent
203314b1aa
commit
6cc6337781
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user