Browse Source

Dev cmd updated

magicbox-1.5.2
MagicBot 1 year ago
parent
commit
4ee4054ab3
  1. 6
      src/engine/devcmd/cmds/GetHeightCmd.java

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

@ -47,6 +47,8 @@ public class GetHeightCmd extends AbstractDevCmd {
float parentHeight = parentZone.terrain.getInterpolatedTerrainHeight(parentZoneLoc); float parentHeight = parentZone.terrain.getInterpolatedTerrainHeight(parentZoneLoc);
parentHeight += parentZone.global_height; parentHeight += parentZone.global_height;
float blendedHeight = Terrain.getWorldHeight(currentZone, playerCharacter.getLoc());
Vector2f gridSquare = heightmapZone.terrain.getTerrainCell(childZoneLoc); Vector2f gridSquare = heightmapZone.terrain.getTerrainCell(childZoneLoc);
gridSquare.x = (float) Math.floor(gridSquare.x); gridSquare.x = (float) Math.floor(gridSquare.x);
gridSquare.y = (float) Math.floor(gridSquare.y); gridSquare.y = (float) Math.floor(gridSquare.y);
@ -58,13 +60,13 @@ public class GetHeightCmd extends AbstractDevCmd {
this.throwbackInfo(playerCharacter, "Grid : " + "[" + gridSquare.x + "]" + "[" + gridSquare.y + "]"); this.throwbackInfo(playerCharacter, "Grid : " + "[" + gridSquare.x + "]" + "[" + gridSquare.y + "]");
this.throwbackInfo(playerCharacter, "Offset: " + "[" + normalizedOffset.x + "]" + "[" + normalizedOffset.y + "]"); this.throwbackInfo(playerCharacter, "Offset: " + "[" + normalizedOffset.x + "]" + "[" + normalizedOffset.y + "]");
this.throwbackInfo(playerCharacter, "Blend: " + heightmapZone.terrain.terrainBlend(childZoneOffset)); this.throwbackInfo(playerCharacter, "Blend: " + heightmapZone.terrain.terrainBlend(childZoneOffset));
this.throwbackInfo(playerCharacter, "Height returned: " + Math.ceil(childHeight));
this.throwbackInfo(playerCharacter, "------------"); this.throwbackInfo(playerCharacter, "------------");
this.throwbackInfo(playerCharacter, "Child Height: " + Math.ceil(childHeight)); this.throwbackInfo(playerCharacter, "Child Height: " + Math.ceil(childHeight));
this.throwbackInfo(playerCharacter, "Parent Height : " + Math.ceil(parentHeight)); this.throwbackInfo(playerCharacter, "Parent Height : " + Math.ceil(parentHeight));
this.throwbackInfo(playerCharacter, "------------"); this.throwbackInfo(playerCharacter, "Blended Height : " + Math.ceil(blendedHeight));
} }
@Override @Override

Loading…
Cancel
Save