rust/landgen/src/template_based.rs
changeset 14142 69db1d2e4cec
parent 14121 4d22be35cfa2
child 14161 3078123e84ea
--- a/rust/landgen/src/template_based.rs	Sat Nov 03 17:40:21 2018 +0100
+++ b/rust/landgen/src/template_based.rs	Sat Nov 03 18:29:58 2018 +0100
@@ -19,7 +19,7 @@
 impl LandGenerator for TemplatedLandGenerator {
     fn generate_land<T: Copy + PartialEq, I: Iterator<Item = u32>>(
         &self,
-        parameters: LandGenerationParameters<T>,
+        parameters: &LandGenerationParameters<T>,
         random_numbers: &mut I,
     ) -> Land2D<T> {
         let mut land = Land2D::new(self.outline_template.size, parameters.basic);
@@ -49,7 +49,13 @@
             }
         }
 
-        points.distort(parameters.distance_divisor, random_numbers);
+        if !parameters.skip_distort {
+            points.distort(parameters.distance_divisor, random_numbers);
+        }
+
+        if !parameters.skip_bezier {
+            points.bezierize();
+        }
 
         points.draw(&mut land, parameters.zero);