From 75c56cbeeed5552002633b2e3ac1bdd680dc9d54 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Thu, 14 Sep 2023 14:11:26 -0400 Subject: [PATCH] Devcmd output updated. --- src/engine/InterestManagement/HeightMap.java | 2 +- src/engine/devcmd/cmds/GetHeightCmd.java | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/engine/InterestManagement/HeightMap.java b/src/engine/InterestManagement/HeightMap.java index c1a71c7c..aa395368 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 / 256; + public static float SCALEVALUE = 1.0f / 256; // Heightmap data for all zones. public static final HashMap heightmapByLoadNum = new HashMap<>(); diff --git a/src/engine/devcmd/cmds/GetHeightCmd.java b/src/engine/devcmd/cmds/GetHeightCmd.java index 43519205..64c470b2 100644 --- a/src/engine/devcmd/cmds/GetHeightCmd.java +++ b/src/engine/devcmd/cmds/GetHeightCmd.java @@ -46,8 +46,14 @@ public class GetHeightCmd extends AbstractDevCmd { this.throwbackInfo(playerCharacter, "Zone Height: " + heightmapZone.worldAltitude); this.throwbackInfo(playerCharacter, "Sea Level: " + heightmapZone.getSeaLevel()); this.throwbackInfo(playerCharacter, "Grid : " + (int) gridSquare.x + "x" + (int) gridSquare.y); - this.throwbackInfo(playerCharacter, "***Height returned: " + currentHeight); + this.throwbackInfo(playerCharacter, "*** 256: " + currentHeight); this.throwbackInfo(playerCharacter, "***Adjusted Height: " + (currentHeight + playerCharacter.getCharacterHeight())); + + HeightMap.SCALEVALUE = 1f / 255f; + currentHeight = HeightMap.getWorldHeight(currentZone, playerCharacter.getLoc()); + HeightMap.SCALEVALUE = 1f / 256f; + + this.throwbackInfo(playerCharacter, "***255 Adjusted: " + (currentHeight + playerCharacter.getCharacterHeight())); this.throwbackInfo(playerCharacter, "Drowning Height: " + (heightmapZone.getSeaLevel() + playerCharacter.getCharacterHeight())); this.throwbackInfo(playerCharacter, "------------");