Offset support for blend.

This commit is contained in:
2023-10-11 16:50:52 -04:00
parent dadfc15d39
commit 280bd61e2a
3 changed files with 24 additions and 22 deletions
+3 -3
View File
@@ -38,8 +38,8 @@ public class GetHeightCmd extends AbstractDevCmd {
float currentHeight = Terrain.getWorldHeight(currentZone, playerCharacter.getLoc());
float parentHeight = Terrain.getWorldHeight(parentZone, playerCharacter.getLoc());
Vector2f zoneLoc = ZoneManager.worldToZoneSpace(playerCharacter.getLoc(), heightmapZone);
Vector2f zoneLoc = ZoneManager.worldToTerrainSpace(playerCharacter.getLoc(), heightmapZone);
Vector2f zoneOffset = ZoneManager.worldToZoneOffset(playerCharacter.getLoc(), heightmapZone);
Vector2f gridSquare = heightmapZone.terrain.getTerrainCell(zoneLoc);
this.throwbackInfo(playerCharacter, "Current Zone : " + currentZone.zoneName);
@@ -47,7 +47,7 @@ public class GetHeightCmd extends AbstractDevCmd {
this.throwbackInfo(playerCharacter, "Global Height: " + heightmapZone.worldAltitude);
this.throwbackInfo(playerCharacter, "Sea Level: " + heightmapZone.seaLevel);
this.throwbackInfo(playerCharacter, "Grid : " + Math.floor(gridSquare.x) + "x" + Math.floor(gridSquare.y));
this.throwbackInfo(playerCharacter, "Blend: " + heightmapZone.terrain.terrainBlend(zoneLoc));
this.throwbackInfo(playerCharacter, "Blend: " + heightmapZone.terrain.terrainBlend(zoneOffset));
this.throwbackInfo(playerCharacter, "Height returned: " + Math.ceil(currentHeight));
this.throwbackInfo(playerCharacter, "------------");