From 83fc129d0581af823e168905456326267804acf2 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 11 Sep 2023 15:59:08 -0400 Subject: [PATCH] Dev command output update. --- src/engine/devcmd/cmds/GetHeightCmd.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/engine/devcmd/cmds/GetHeightCmd.java b/src/engine/devcmd/cmds/GetHeightCmd.java index ef4a9dd4..3e6bc42c 100644 --- a/src/engine/devcmd/cmds/GetHeightCmd.java +++ b/src/engine/devcmd/cmds/GetHeightCmd.java @@ -30,18 +30,21 @@ public class GetHeightCmd extends AbstractDevCmd { Zone currentZone; Zone parentZone; + Zone heightmapZone; currentZone = ZoneManager.findSmallestZone(playerCharacter.getLoc()); + heightmapZone = HeightMap.getNextZoneWithTerrain(currentZone); parentZone = HeightMap.getNextZoneWithTerrain(currentZone.getParent()); float currentHeight = HeightMap.getWorldHeight(currentZone, playerCharacter.getLoc()); float parentHeight = HeightMap.getWorldHeight(parentZone, playerCharacter.getLoc()); - this.throwbackInfo(playerCharacter, "Zone : " + currentZone.getName()); + this.throwbackInfo(playerCharacter, "Current Zone : " + currentZone.getName()); + this.throwbackInfo(playerCharacter, "Heightmap Zone : " + heightmapZone.getName()); this.throwbackInfo(playerCharacter, "Altitude : " + currentHeight); - Vector2f zoneLoc = ZoneManager.worldToZoneSpace(playerCharacter.getLoc(), currentZone); - Vector2f gridSquare = currentZone.getHeightMap().getGridSquare(zoneLoc); + Vector2f zoneLoc = ZoneManager.worldToZoneSpace(playerCharacter.getLoc(), heightmapZone); + Vector2f gridSquare = heightmapZone.getHeightMap().getGridSquare(zoneLoc); this.throwbackInfo(playerCharacter, "Grid : " + (int) gridSquare.x + "x" + (int) gridSquare.y); this.throwbackInfo(playerCharacter, "Parent : " + parentZone.getName());