Browse Source

Dev command output update.

combat-2
MagicBot 1 year ago
parent
commit
83fc129d05
  1. 9
      src/engine/devcmd/cmds/GetHeightCmd.java

9
src/engine/devcmd/cmds/GetHeightCmd.java

@ -30,18 +30,21 @@ public class GetHeightCmd extends AbstractDevCmd {
Zone currentZone; Zone currentZone;
Zone parentZone; Zone parentZone;
Zone heightmapZone;
currentZone = ZoneManager.findSmallestZone(playerCharacter.getLoc()); currentZone = ZoneManager.findSmallestZone(playerCharacter.getLoc());
heightmapZone = HeightMap.getNextZoneWithTerrain(currentZone);
parentZone = HeightMap.getNextZoneWithTerrain(currentZone.getParent()); parentZone = HeightMap.getNextZoneWithTerrain(currentZone.getParent());
float currentHeight = HeightMap.getWorldHeight(currentZone, playerCharacter.getLoc()); float currentHeight = HeightMap.getWorldHeight(currentZone, playerCharacter.getLoc());
float parentHeight = HeightMap.getWorldHeight(parentZone, 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); this.throwbackInfo(playerCharacter, "Altitude : " + currentHeight);
Vector2f zoneLoc = ZoneManager.worldToZoneSpace(playerCharacter.getLoc(), currentZone); Vector2f zoneLoc = ZoneManager.worldToZoneSpace(playerCharacter.getLoc(), heightmapZone);
Vector2f gridSquare = currentZone.getHeightMap().getGridSquare(zoneLoc); Vector2f gridSquare = heightmapZone.getHeightMap().getGridSquare(zoneLoc);
this.throwbackInfo(playerCharacter, "Grid : " + (int) gridSquare.x + "x" + (int) gridSquare.y); this.throwbackInfo(playerCharacter, "Grid : " + (int) gridSquare.x + "x" + (int) gridSquare.y);
this.throwbackInfo(playerCharacter, "Parent : " + parentZone.getName()); this.throwbackInfo(playerCharacter, "Parent : " + parentZone.getName());

Loading…
Cancel
Save