rust/lib-hedgewars-engine/src/world.rs
changeset 15755 2eb3469a28a0
parent 15275 66c987015f2d
child 15757 c7332c7f64cd
--- a/rust/lib-hedgewars-engine/src/world.rs	Thu Oct 22 13:27:49 2020 +0200
+++ b/rust/lib-hedgewars-engine/src/world.rs	Wed Nov 11 12:45:29 2020 -0500
@@ -2,6 +2,7 @@
 use hwphysics::{
     self as hwp,
     common::{GearId, Millis},
+    physics::{PositionData, VelocityData},
 };
 use integral_geometry::{Point, Rect, Size};
 use land2d::Land2D;
@@ -135,7 +136,11 @@
             let fp_position = FPPoint::new(position.x.into(), position.y.into());
             state.physics.add_gear_data(
                 id,
-                hwp::physics::PhysicsData::new(fp_position, FPPoint::zero()),
+                &PositionData(fp_position)
+            );
+            state.physics.add_gear_data(
+                id,
+                &VelocityData(FPPoint::zero())
             )
         }
     }