From c84daeb2391bc70b72c6516d887ec854664ec996 Mon Sep 17 00:00:00 2001 From: Dustin Carlino Date: Tue, 17 May 2022 16:15:34 +0100 Subject: [PATCH] Don't let people filter one-way roads! --- apps/ltn/src/per_neighborhood.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/ltn/src/per_neighborhood.rs b/apps/ltn/src/per_neighborhood.rs index 2d4f01f0d3..875e1dbee8 100644 --- a/apps/ltn/src/per_neighborhood.rs +++ b/apps/ltn/src/per_neighborhood.rs @@ -231,8 +231,9 @@ pub fn handle_world_outcome( match outcome { WorldOutcome::ClickedObject(FilterableObj::InteriorRoad(r)) => { let road = map.get_r(r); - // Filtering on a road that's already marked bike-only doesn't make sense - if !PathConstraints::Car.can_use_road(road, map) { + // Filtering a road that's already marked bike-only doesn't make sense. Likewise for + // one-ways. + if !PathConstraints::Car.can_use_road(road, map) || road.is_oneway() { return true; }