Start terrain refactor

This commit is contained in:
2023-10-08 09:18:43 -04:00
parent ffb541a12e
commit 0d75e6db9b
12 changed files with 52 additions and 53 deletions
+5 -5
View File
@@ -9,7 +9,7 @@
package engine.devcmd.cmds;
import engine.InterestManagement.HeightMap;
import engine.InterestManagement.Terrain;
import engine.devcmd.AbstractDevCmd;
import engine.gameManager.ZoneManager;
import engine.math.Bounds;
@@ -33,11 +33,11 @@ public class GetHeightCmd extends AbstractDevCmd {
Zone heightmapZone;
currentZone = ZoneManager.findSmallestZone(playerCharacter.getLoc());
heightmapZone = HeightMap.getNextZoneWithTerrain(currentZone);
parentZone = HeightMap.getNextZoneWithTerrain(currentZone.parent);
heightmapZone = Terrain.getNextZoneWithTerrain(currentZone);
parentZone = Terrain.getNextZoneWithTerrain(currentZone.parent);
float currentHeight = HeightMap.getWorldHeight(currentZone, playerCharacter.getLoc());
float parentHeight = HeightMap.getWorldHeight(parentZone, playerCharacter.getLoc());
float currentHeight = Terrain.getWorldHeight(currentZone, playerCharacter.getLoc());
float parentHeight = Terrain.getWorldHeight(parentZone, playerCharacter.getLoc());
Vector2f zoneLoc = ZoneManager.worldToZoneSpace(playerCharacter.getLoc(), heightmapZone);
Vector2f gridSquare = heightmapZone.getHeightMap().getTerrainCell(zoneLoc);