rust/hwphysics/src/collision.rs
changeset 15261 501dfa1c8deb
parent 15120 febccab419b1
child 15263 24828281c9c5
--- a/rust/hwphysics/src/collision.rs	Wed Jul 24 22:49:59 2019 +0300
+++ b/rust/hwphysics/src/collision.rs	Wed Jul 24 23:33:06 2019 +0300
@@ -107,6 +107,9 @@
     }
 
     pub fn process(&mut self, land: &Land2D<u32>, updates: &crate::physics::PositionUpdates) {
+        for (id, old_position, new_position) in updates.iter() {
+            self.grid.update_position(id, old_position, new_position)
+        }
         self.grid.check_collisions(&mut self.detected_collisions);
 
         for (gear_id, collision) in self.enabled_collisions.iter() {