diff --git a/core/src/ru/deadsoftware/cavecraft/game/WorldGen.java b/core/src/ru/deadsoftware/cavecraft/game/WorldGen.java
index ccbe50a2ad29dd08e95581e749741a36a767f1ef..b8e9aee59b953e9742366f1300b27d7b64414da4 100644 (file)
int t;
res[0] = mid;
for (int i=1; i<width; i++) {
- t = rand.nextInt(3)-1;
+ t = rand.nextInt(7)-3;
+ if (t>-3 && t<3) t=0; else t/=Math.abs(t);
if (i>width-(max-min)) {
if (res[i-1]+t<res[0]) t=Math.abs(t);
else if (res[i-1]+t>res[0]) t=-Math.abs(t);
}
}
if (x>2 && x<width-2 && rand.nextInt(100)<5){
- if (foreMap[x][height-hMap[x]]-1==0) genOak(x,height-hMap[x]-1);
+ if (foreMap[x][height-hMap[x]-1]==0) {
+ genOak(x,height-hMap[x]-1);
+ }
}
}
}