fixed AbstractHeightMap bounds check, thanks ozonegrif

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7830 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
bre..ns 14 years ago
parent 7b0f06ff4d
commit 08e5d1a68f
  1. 4
      engine/src/terrain/com/jme3/terrain/heightmap/AbstractHeightMap.java

@ -184,7 +184,7 @@ public abstract class AbstractHeightMap implements HeightMap {
low = getScaledHeightAtPoint((int) x, (int) z);
if (x + 1 > size) {
if (x + 1 >= size) {
return low;
}
@ -193,7 +193,7 @@ public abstract class AbstractHeightMap implements HeightMap {
interpolation = x - (int) x;
intX = ((highX - low) * interpolation) + low;
if (z + 1 > size) {
if (z + 1 >= size) {
return low;
}

Loading…
Cancel
Save