|
|
|
@ -12,6 +12,7 @@ package engine.devcmd.cmds;
@@ -12,6 +12,7 @@ package engine.devcmd.cmds;
|
|
|
|
|
import engine.InterestManagement.HeightMap; |
|
|
|
|
import engine.devcmd.AbstractDevCmd; |
|
|
|
|
import engine.gameManager.ZoneManager; |
|
|
|
|
import engine.math.Bounds; |
|
|
|
|
import engine.math.Vector2f; |
|
|
|
|
import engine.objects.AbstractGameObject; |
|
|
|
|
import engine.objects.PlayerCharacter; |
|
|
|
@ -45,24 +46,28 @@ public class GetHeightCmd extends AbstractDevCmd {
@@ -45,24 +46,28 @@ public class GetHeightCmd extends AbstractDevCmd {
|
|
|
|
|
this.throwbackInfo(playerCharacter, "Heightmap Zone : " + heightmapZone.getName()); |
|
|
|
|
this.throwbackInfo(playerCharacter, "Zone Height: " + heightmapZone.worldAltitude); |
|
|
|
|
this.throwbackInfo(playerCharacter, "Sea Level: " + heightmapZone.getSeaLevel()); |
|
|
|
|
this.throwbackInfo(playerCharacter, "Drowning Height: " + (heightmapZone.getSeaLevel() + playerCharacter.getCharacterHeight())); |
|
|
|
|
this.throwbackInfo(playerCharacter, "Grid : " + (int) gridSquare.x + "x" + (int) gridSquare.y); |
|
|
|
|
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, "------------"); |
|
|
|
|
this.throwbackInfo(playerCharacter, "Parent : " + parentZone.getName()); |
|
|
|
|
this.throwbackInfo(playerCharacter, "Height returned : " + parentHeight); |
|
|
|
|
this.throwbackInfo(playerCharacter, "[" + (gridSquare.x) + "][" + (gridSquare.y) + "]"); |
|
|
|
|
this.throwbackInfo(playerCharacter, "[" + (gridSquare.x + 1) + "][" + (gridSquare.y) + "]"); |
|
|
|
|
this.throwbackInfo(playerCharacter, "[" + (gridSquare.x) + "][" + (gridSquare.y + 1) + "]"); |
|
|
|
|
this.throwbackInfo(playerCharacter, "[" + (gridSquare.x + 1) + "][" + (gridSquare.y + 1) + "]"); |
|
|
|
|
this.throwbackInfo(playerCharacter, "------------"); |
|
|
|
|
|
|
|
|
|
if (Bounds.collide(playerCharacter.getLoc(), heightmapZone.maxBlend)) { |
|
|
|
|
this.throwbackInfo(playerCharacter, "Blend: Max / Child"); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (Bounds.collide(playerCharacter.getLoc(), heightmapZone.minBlend)) { |
|
|
|
|
this.throwbackInfo(playerCharacter, "Blend: Min / LERP"); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.throwbackInfo(playerCharacter, "Blend: None / Parent"); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|