diff --git a/profiles/car.lua b/profiles/car.lua index 79c63c12f..da6e6cedc 100644 --- a/profiles/car.lua +++ b/profiles/car.lua @@ -32,13 +32,13 @@ speed_profile = { ["default"] = 50 } -take_minimum_of_speeds = false -obey_oneway = true -obey_bollards = true -use_restrictions = true -ignore_areas = true -- future feature -traffic_signal_penalty = 2 -u_turn_penalty = 20 +take_minimum_of_speeds = false +obey_oneway = true +obey_bollards = true +use_restrictions = true +ignore_areas = true -- future feature +traffic_signal_penalty = 2 +u_turn_penalty = 20 -- End of globals @@ -182,11 +182,17 @@ function way_function (way) -- Set direction according to tags on way way.direction = Way.bidirectional - if obey_oneway then + if obey_oneway then if oneway == "-1" then way.direction = Way.opposite - elseif oneway == "yes" or oneway == "1" or oneway == "true" or junction == "roundabout" or highway == "motorway_link" or highway == "motorway" then - way.direction = Way.oneway + elseif oneway == "yes" or + oneway == "1" or + oneway == "true" or + junction == "roundabout" or + (highway == "motorway_link" and oneway ~="no") or + (highway == "motorway" and oneway ~= "no") + then + way.direction = Way.oneway end end