mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-23 00:04:27 +03:00
Fix mapbox demo. #1023
This commit is contained in:
parent
0e87b78c0c
commit
358ae97f02
@ -100,9 +100,10 @@ impl PiggybackDemo {
|
|||||||
pub fn spawn_traffic(&mut self) {
|
pub fn spawn_traffic(&mut self) {
|
||||||
let mut rng = sim::SimFlags::for_test("spawn_traffic").make_rng();
|
let mut rng = sim::SimFlags::for_test("spawn_traffic").make_rng();
|
||||||
let mut timer = Timer::new("spawn traffic");
|
let mut timer = Timer::new("spawn traffic");
|
||||||
sim::ScenarioGenerator::small_run(&self.map)
|
let scenario =
|
||||||
.generate(&self.map, &mut rng, &mut timer)
|
sim::ScenarioGenerator::small_run(&self.map).generate(&self.map, &mut rng, &mut timer);
|
||||||
.instantiate(&mut self.sim, &self.map, &mut rng, &mut timer);
|
self.sim
|
||||||
|
.instantiate(&scenario, &self.map, &mut rng, &mut timer);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Reset the traffic simulation.
|
/// Reset the traffic simulation.
|
||||||
|
Loading…
Reference in New Issue
Block a user