Selaa lähdekoodia

fixed bug in abstractHeightmap.smooth, thanks to ozonegrif

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7563 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
bre..ns 14 vuotta sitten
vanhempi
sitoutus
5a79adc4fe

+ 2 - 2
engine/src/terrain/com/jme3/terrain/heightmap/AbstractHeightMap.java

@@ -447,10 +447,10 @@ public abstract class AbstractHeightMap implements HeightMap {
                 for (int d = 0; d < 8; d++) {
                 for (int d = 0; d < 8; d++) {
                     int i = x + dxs[d];
                     int i = x + dxs[d];
                     int j = y + dys[d];
                     int j = y + dys[d];
-                    if (i < 0 || i > size) {
+                    if (i < 0 || i >= size) {
                         continue;
                         continue;
                     }
                     }
-                    if (j < 0 || j > size) {
+                    if (j < 0 || j >= size) {
                         continue;
                         continue;
                     }
                     }
                     neighNumber++;
                     neighNumber++;