Skip to content

Commit

Permalink
Fix stairs direction (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
pablohoch authored Feb 12, 2024
1 parent 8a84abb commit cd7a1d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/routing/costs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,8 @@ edge_costs get_edge_costs(routing_graph_data const& rg, edge const* e,

if (info->street_type_ == street_type::STAIRS) {
auto const steps = edge_step_count(rg, e);
auto const& cf =
get_stairs_factor(profile, info->incline_up_, info->handrail_);
auto const incline_up = fwd ? info->incline_up_ : !info->incline_up_;
auto const& cf = get_stairs_factor(profile, incline_up, info->handrail_);
add_factor(cf, steps);
} else if (info->street_type_ == street_type::ESCALATOR) {
add_factor(profile.escalator_cost_, distance);
Expand Down

0 comments on commit cd7a1d7

Please sign in to comment.