mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-24 15:02:59 +03:00
Don't let people filter one-way roads!
This commit is contained in:
parent
078265718a
commit
c84daeb239
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user