rust/lib-hedgewars-engine/src/world.rs
changeset 15757 c7332c7f64cd
parent 15755 2eb3469a28a0
child 15758 6c939e6de981
--- a/rust/lib-hedgewars-engine/src/world.rs	Wed Nov 11 21:18:31 2020 +0300
+++ b/rust/lib-hedgewars-engine/src/world.rs	Wed Nov 11 22:40:33 2020 +0300
@@ -106,6 +106,14 @@
         let land = landgen.generate_land(&params, &mut self.random_numbers_gen);
 
         self.game_state = Some(GameState::new(land, physics));
+
+        if let Some(ref mut state) = self.game_state {
+            let position = Point::new(
+                (self.random_numbers_gen.next().unwrap() % state.land.width() as u32) as i32,
+                0,
+            );
+            self.create_gear(position);
+        }
     }
 
     pub fn move_camera(&mut self, position_shift: Point, zoom_shift: f32) {
@@ -148,13 +156,13 @@
     pub fn step(&mut self) {
         if let Some(ref mut state) = self.game_state {
             let next = self.random_numbers_gen.next().unwrap();
-            if next % 32 == 0 {
+            /*if next % 32 == 0 {
                 let position = Point::new(
                     (self.random_numbers_gen.next().unwrap() % state.land.width() as u32) as i32,
                     0,
                 );
                 self.create_gear(position);
-            }
+            }*/
         }
 
         if let Some(ref mut state) = self.game_state {