From dfca76747660fe09507d59360db29a596c7260a4 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Thu, 14 Sep 2023 12:25:18 -0400 Subject: [PATCH] Multiple not divide. --- src/engine/InterestManagement/HeightMap.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/engine/InterestManagement/HeightMap.java b/src/engine/InterestManagement/HeightMap.java index 61c09b98..77b12f8b 100644 --- a/src/engine/InterestManagement/HeightMap.java +++ b/src/engine/InterestManagement/HeightMap.java @@ -30,6 +30,7 @@ public class HeightMap { // Class variables + public static final float SCALEVALUE = 1.0f / 255; // Heightmap data for all zones. public static final HashMap heightmapByLoadNum = new HashMap<>(); @@ -417,7 +418,7 @@ public class HeightMap { interpolatedHeight += (bottomLeftHeight * (1 - offsetX) * offsetY); interpolatedHeight += (topLeftHeight * (1 - offsetX) * (1 - offsetY)); - interpolatedHeight *= (float) this.maxHeight / 256; // Scale height + interpolatedHeight *= (float) this.maxHeight / SCALEVALUE; // Scale height return interpolatedHeight; }