workaround bus getting stuck on tiny road by making more left turns

This commit is contained in:
Dustin Carlino 2019-01-31 13:11:52 -08:00
parent b9e96618da
commit 7432ec1b42
2 changed files with 7 additions and 4 deletions

View File

@ -3,9 +3,6 @@
## Geometry
- try fixed pt again, for determinism purposes mostly
- just get it working
- buses are getting stuck on this weird tiny thing
- border spawn is making briefly invisible cars; start them farther out?
- can natively order
- then work on proper SI types, with negative/positive cases handled carefully

View File

@ -125,7 +125,13 @@ fn make_vehicle_turns(i: &Intersection, all_roads: &Vec<&Road>, lanes: &Vec<&Lan
));
}
TurnType::Left => {
result.push(make_vehicle_turn(lanes, i.id, incoming[0], outgoing[0]));
if incoming.len() == 1 {
for out in outgoing {
result.push(make_vehicle_turn(lanes, i.id, incoming[0], out));
}
} else {
result.push(make_vehicle_turn(lanes, i.id, incoming[0], outgoing[0]));
}
}
_ => unreachable!(),
};