Skip to content

Commit

Permalink
Finalize footways import:
Browse files Browse the repository at this point in the history
- workaround spurious diff test failure
- fix unrelated problem in trip info tab introduced with the polygon
  cleanup the other week
- fix a bug with matching a building to a sidewalk
  • Loading branch information
dabreegster committed Sep 16, 2022
1 parent 35847ae commit d9ce7dd
Show file tree
Hide file tree
Showing 6 changed files with 587 additions and 579 deletions.
3 changes: 2 additions & 1 deletion apps/game/src/info/trip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -670,12 +670,13 @@ fn make_timeline(
));
d
};
// TODO Problems when this is really low?
let percent_duration = if total_duration_so_far == Duration::ZERO {
0.0
} else {
phase_duration / total_duration_so_far
};
// Don't crash when this is too low
let percent_duration = percent_duration.max(0.01);
tooltip.push(format!(
" {}% of trip percentage",
(100.0 * percent_duration) as usize
Expand Down
2 changes: 2 additions & 0 deletions map_gui/src/render/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,8 @@ impl DrawMap {
|| (i.is_traffic_signal() && opts.show_traffic_signal_icon)
{
// Use the color of the road, so the intersection doesn't stand out
// TODO When cycleways meet footways, we fallback to unzoomed_road_surface. Maybe
// we need a ranking for types here too
if i.is_light_rail(map) {
cs.light_rail_track
} else if i.is_cycleway(map) {
Expand Down
2 changes: 1 addition & 1 deletion map_model/src/objects/building.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ impl Building {
return Some(pair);
}
for (_, next) in map.get_next_turns_and_lanes(l) {
if !visited.contains(&next.id) {
if next.is_walkable() && !visited.contains(&next.id) {
queue.push_back(next.id);
}
}
Expand Down
Loading

0 comments on commit d9ce7dd

Please sign in to comment.