restore gear generation
authoralfadur
Wed, 11 Nov 2020 22:41:31 +0300
changeset 15780 6c939e6de981
parent 15779 c7332c7f64cd
child 15781 c929e25a7da2
restore gear generation
rust/lib-hedgewars-engine/src/world.rs
--- a/rust/lib-hedgewars-engine/src/world.rs	Wed Nov 11 22:40:33 2020 +0300
+++ b/rust/lib-hedgewars-engine/src/world.rs	Wed Nov 11 22:41:31 2020 +0300
@@ -106,14 +106,6 @@
         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) {
@@ -156,13 +148,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 {