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);