From d26a2d35bfde2e68130fbe8e59638d4a46f7ee6f Mon Sep 17 00:00:00 2001 From: MagicBot Date: Thu, 14 Sep 2023 12:39:31 -0400 Subject: [PATCH] Multiple not divide --- 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 ed3285a1..2534d0a4 100644 --- a/src/engine/InterestManagement/HeightMap.java +++ b/src/engine/InterestManagement/HeightMap.java @@ -30,7 +30,7 @@ public class HeightMap { // Class variables - public static final float SCALEVALUE = 1.0f / 256f; + public static final float SCALEVALUE = 1.0f / 255; // Heightmap data for all zones. public static final HashMap heightmapByLoadNum = new HashMap<>(); @@ -433,7 +433,7 @@ public class HeightMap { interpolatedHeight += (bottomLeftHeight * (1 - offsetX) * offsetY); interpolatedHeight += (topLeftHeight * (1 - offsetX) * (1 - offsetY)); - interpolatedHeight *= (float) this.maxHeight / SCALEVALUE; // Scale height + interpolatedHeight *= (float) this.maxHeight * SCALEVALUE; // Scale height return interpolatedHeight; }