fix bug where commands scheduled at tick 0 were skipped
@@ -138,8 +138,6 @@ impl Sim {
}
fn inner_step(&mut self, map: &Map, control_map: &ControlMap) -> Result<(Vec<Event>), Error> {
- self.time = self.time.next();
-
let mut view = WorldView::new();
let mut events: Vec<Event> = Vec::new();
@@ -216,6 +214,10 @@ impl Sim {
}
}
+ // Do this at the end of the step, so that tick 0 actually occurs and things can happen
+ // then.
+ self.time = self.time.next();
+
Ok(events)
}
