Skip to content

Commit

Permalink
fix level change from kNoLevel with stairs
Browse files Browse the repository at this point in the history
  • Loading branch information
felixguendling committed Nov 3, 2024
1 parent 02c6782 commit 91263e5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion include/osr/routing/profiles/foot.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,10 @@ struct foot {
}

if (way_prop.is_steps()) {
if (way_prop.from_level() == from_level) {
if (from_level == kNoLevel) {
return way_prop.from_level() == level_t{0.F} ? way_prop.to_level()
: way_prop.from_level();
} else if (way_prop.from_level() == from_level) {
return way_prop.to_level();
} else if (way_prop.to_level() == from_level) {
return way_prop.from_level();
Expand Down

0 comments on commit 91263e5

Please sign in to comment.