From 1ac65dd9bd4b5f45ec6dc62fdb74d54aa6b27bef Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sat, 16 Sep 2023 08:31:04 -0400 Subject: [PATCH] Tightened clamping. --- src/engine/InterestManagement/HeightMap.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);