Start refactor to use templates

This commit is contained in:
2023-10-20 17:01:42 -04:00
parent cb0ba901de
commit 091b1a1d5b
8 changed files with 46 additions and 64 deletions
+2 -2
View File
@@ -37,8 +37,8 @@ public class GetHeightCmd extends AbstractDevCmd {
Vector2f childZoneLoc = ZoneManager.worldToTerrainSpace(playerCharacter.getLoc(), heightmapZone);
Vector2f childZoneOffset = ZoneManager.worldToZoneOffset(playerCharacter.getLoc(), heightmapZone);
Vector2f normalizedOffset = new Vector2f(Math.abs(childZoneOffset.x) / heightmapZone.major_radius,
Math.abs(childZoneOffset.y) / heightmapZone.minor_radius);
Vector2f normalizedOffset = new Vector2f(Math.abs(childZoneOffset.x) / heightmapZone.template.major_radius,
Math.abs(childZoneOffset.y) / heightmapZone.template.minor_radius);
Vector2f parentZoneLoc = ZoneManager.worldToTerrainSpace(playerCharacter.getLoc(), parentZone);
float childHeight = heightmapZone.terrain.getInterpolatedTerrainHeight(childZoneLoc);
+2 -2
View File
@@ -91,7 +91,7 @@ public class ZoneInfoCmd extends AbstractDevCmd {
output += newline;
if (zone.terrain != null) {
output += "Terrain image: " + zone.terrain_image;
output += "Terrain image: " + zone.template.terrain_image;
output += newline;
}
@@ -99,7 +99,7 @@ public class ZoneInfoCmd extends AbstractDevCmd {
output += newline;
// output += "minLvl = " + zone.getMinLvl() + " | maxLvl = " + zone.getMaxLvl();
output += newline;
output += "Sea Level = " + zone.seaLevel;
output += "Sea Level = " + zone.sea_level;
output += newline;
output += "World Altitude = " + zone.global_height;
throwbackInfo(player, output);