diff --git a/src/engine/InterestManagement/HeightMap.java b/src/engine/InterestManagement/HeightMap.java index ae1295a7..edccb593 100644 --- a/src/engine/InterestManagement/HeightMap.java +++ b/src/engine/InterestManagement/HeightMap.java @@ -331,9 +331,9 @@ public class HeightMap { if (gridY < 0) gridY = 0; - if (gridX > maxX) + if (gridX >= maxX) gridX = maxX - 1; - if (gridY > maxY) + if (gridY >= maxY) gridY = maxY - 1; float offsetX = (gridSquare.x - gridX);