mirror of
https://github.com/a-b-street/abstreet.git
synced 2025-01-08 07:41:57 +03:00
filter out random border no-op trips. they crash poor berlin
This commit is contained in:
parent
2279f2a873
commit
28d0469d10
@ -471,6 +471,11 @@ impl ScenarioGenerator {
|
||||
let random_outgoing_border = outgoing_connections.choose(rng).unwrap();
|
||||
let b_random_incoming_border = incoming_connections.choose(rng).unwrap();
|
||||
let b_random_outgoing_border = outgoing_connections.choose(rng).unwrap();
|
||||
if random_incoming_border.id == random_outgoing_border.id
|
||||
|| b_random_incoming_border.id == b_random_outgoing_border.id
|
||||
{
|
||||
continue;
|
||||
}
|
||||
// TODO calculate
|
||||
let distance_on_map = Distance::meters(2000.0);
|
||||
// TODO randomize
|
||||
|
Loading…
Reference in New Issue
Block a user