remove velocity check
authoralfadur
Thu, 29 Aug 2019 00:08:03 +0300
changeset 15403 6ad92b6ac43c
parent 15402 52844baced17
child 15404 701ad89a9f2a
remove velocity check
rust/hwphysics/src/physics.rs
--- a/rust/hwphysics/src/physics.rs	Thu Aug 29 00:06:31 2019 +0300
+++ b/rust/hwphysics/src/physics.rs	Thu Aug 29 00:08:03 2019 +0300
@@ -68,12 +68,10 @@
 
         data.iter_id(
             |gear_id, (pos, vel): (&mut PositionData, &mut VelocityData)| {
-                if !vel.0.is_zero() {
-                    let old_pos = pos.0;
-                    vel.0 -= self.gravity * fp_step;
-                    pos.0 += vel.0 * fp_step;
-                    self.position_updates.push(gear_id, &old_pos, &pos.0)
-                }
+                let old_pos = pos.0;
+                vel.0 -= self.gravity * fp_step;
+                pos.0 += vel.0 * fp_step;
+                self.position_updates.push(gear_id, &old_pos, &pos.0)
             },
         );