Browse Source

Multiple not divide

feature-region-set
MagicBot 1 year ago
parent
commit
d26a2d35bf
  1. 4
      src/engine/InterestManagement/HeightMap.java

4
src/engine/InterestManagement/HeightMap.java

@ -30,7 +30,7 @@ public class HeightMap {
// Class variables // Class variables
public static final float SCALEVALUE = 1.0f / 256f; public static final float SCALEVALUE = 1.0f / 255;
// Heightmap data for all zones. // Heightmap data for all zones.
public static final HashMap<Integer, HeightMap> heightmapByLoadNum = new HashMap<>(); public static final HashMap<Integer, HeightMap> heightmapByLoadNum = new HashMap<>();
@ -433,7 +433,7 @@ public class HeightMap {
interpolatedHeight += (bottomLeftHeight * (1 - offsetX) * offsetY); interpolatedHeight += (bottomLeftHeight * (1 - offsetX) * offsetY);
interpolatedHeight += (topLeftHeight * (1 - offsetX) * (1 - offsetY)); interpolatedHeight += (topLeftHeight * (1 - offsetX) * (1 - offsetY));
interpolatedHeight *= (float) this.maxHeight / SCALEVALUE; // Scale height interpolatedHeight *= (float) this.maxHeight * SCALEVALUE; // Scale height
return interpolatedHeight; return interpolatedHeight;
} }

Loading…
Cancel
Save