equal
deleted
inserted
replaced
51 self.time.cancel(gear_id); |
51 self.time.cancel(gear_id); |
52 self.allocator.free(gear_id) |
52 self.allocator.free(gear_id) |
53 } |
53 } |
54 |
54 |
55 pub fn step(&mut self, time_step: Millis, land: &Land2D<u32>) { |
55 pub fn step(&mut self, time_step: Millis, land: &Land2D<u32>) { |
56 let updates = self.physics.process(&mut self.data, time_step); |
56 let updates = if time_step == Millis::new(1) { |
|
57 self.physics.process_single_tick(&mut self.data) |
|
58 } else { |
|
59 self.physics |
|
60 .process_multiple_ticks(&mut self.data, time_step) |
|
61 }; |
57 let collisions = self.collision.process(land, &updates); |
62 let collisions = self.collision.process(land, &updates); |
58 let events = self.time.process(time_step); |
63 let events = self.time.process(time_step); |
59 } |
64 } |
60 |
65 |
61 #[inline] |
66 #[inline] |