hedgewars/uLandGenTemplateBased.pas
changeset 10499 0d8016085108
parent 10495 6d61b44a5652
child 10502 a888e649bea2
--- a/hedgewars/uLandGenTemplateBased.pas	Sat Nov 15 13:52:07 2014 +0300
+++ b/hedgewars/uLandGenTemplateBased.pas	Sat Nov 15 09:26:08 2014 -0500
@@ -6,7 +6,7 @@
 procedure GenTemplated(var Template: TEdgeTemplate);
 procedure DivideEdges(fillPointsCount: LongWord; var pa: TPixAr);
 
-var minDistance: LongInt; // different details size
+var minDistance, dabDiv: LongInt; // different details size
 
 implementation
 uses uVariables, uConsts, uFloat, uLandUtils, uRandom, SDLh, math;
@@ -261,7 +261,7 @@
 
     // don't move new point for more than length of initial segment
     // adjust/parametrize for more flat surfaces (try values 3/4, 1/2 of dab, or even 1/4)
-    d:= dab;
+    d:= dab * 100 div dabDiv;
     //d:= dab * (1 + abs(cFeatureSize - 8)) div 6;
     //d:= dab * (14 + cFeatureSize) div 20;
     if distL > d then distL:= d;
@@ -345,6 +345,9 @@
             Land[y, x]:= lfBasic;
     
     minDistance:= sqr(cFeatureSize) div 8 + 10;
+    //dabDiv:= getRandom(41)+60;
+    //dabDiv:= getRandom(31)+70;
+    dabDiv:= getRandom(21)+100;
     MaxHedgehogs:= Template.MaxHedgehogs;
     hasGirders:= Template.hasGirders;
     playHeight:= Template.TemplateHeight;