DEADSOFTWARE

Fix trees
authorfred-boy <fred-boy@protonmail.com>
Sat, 21 Apr 2018 20:03:16 +0000 (03:03 +0700)
committerfred-boy <fred-boy@protonmail.com>
Sat, 21 Apr 2018 20:03:16 +0000 (03:03 +0700)
core/src/ru/deadsoftware/cavecraft/game/WorldGen.java

index ccbe50a2ad29dd08e95581e749741a36a767f1ef..fb1509e7a7c7aa503f75c0ec8e3fbdfe9dfc901a 100644 (file)
@@ -90,7 +90,9 @@ public class WorldGen {
                 }
             }
             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);
+                }
             }
         }
     }