From ad661ea4643104672715432a142d5e6fcc6b6065 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Thu, 12 Oct 2023 06:43:02 -0400 Subject: [PATCH] Dev command updated --- src/engine/devcmd/cmds/GetHeightCmd.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/engine/devcmd/cmds/GetHeightCmd.java b/src/engine/devcmd/cmds/GetHeightCmd.java index 9b8266e7..cb6e9abd 100644 --- a/src/engine/devcmd/cmds/GetHeightCmd.java +++ b/src/engine/devcmd/cmds/GetHeightCmd.java @@ -41,12 +41,15 @@ public class GetHeightCmd extends AbstractDevCmd { Vector2f zoneLoc = ZoneManager.worldToTerrainSpace(playerCharacter.getLoc(), heightmapZone); Vector2f zoneOffset = ZoneManager.worldToZoneOffset(playerCharacter.getLoc(), heightmapZone); Vector2f gridSquare = heightmapZone.terrain.getTerrainCell(zoneLoc); + gridSquare.x = (float) Math.floor(gridSquare.x); + gridSquare.y = (float) Math.floor(gridSquare.y); this.throwbackInfo(playerCharacter, "Current Zone : " + currentZone.zoneName); this.throwbackInfo(playerCharacter, "Heightmap Zone : " + heightmapZone.zoneName); this.throwbackInfo(playerCharacter, "Global Height: " + heightmapZone.global_height); this.throwbackInfo(playerCharacter, "Sea Level: " + heightmapZone.seaLevel); - this.throwbackInfo(playerCharacter, "Grid : " + Math.floor(gridSquare.x) + "x" + Math.floor(gridSquare.y)); + this.throwbackInfo(playerCharacter, "Grid : " + gridSquare); + this.throwbackInfo(playerCharacter, "Offset: " + zoneOffset); this.throwbackInfo(playerCharacter, "Blend: " + heightmapZone.terrain.terrainBlend(zoneOffset)); this.throwbackInfo(playerCharacter, "Height returned: " + Math.ceil(currentHeight));