Completed partial refactor.
This commit is contained in:
@@ -41,13 +41,13 @@ public class Terrain {
|
||||
|
||||
Zone terrain_zone = zone;
|
||||
|
||||
if (zone.getHeightMap() != null)
|
||||
if (zone.terrain != null)
|
||||
return zone;
|
||||
|
||||
if (zone.equals(ZoneManager.getSeaFloor()))
|
||||
return zone;
|
||||
|
||||
while (terrain_zone.getHeightMap() == null)
|
||||
while (terrain_zone.terrain == null)
|
||||
terrain_zone = terrain_zone.parent;
|
||||
|
||||
return terrain_zone;
|
||||
@@ -74,7 +74,7 @@ public class Terrain {
|
||||
|
||||
// Interpolate height for this position using pixel array.
|
||||
|
||||
float interpolatedTerrainHeight = terrainZone.getHeightMap().getInterpolatedTerrainHeight(terrainLoc);
|
||||
float interpolatedTerrainHeight = terrainZone.terrain.getInterpolatedTerrainHeight(terrainLoc);
|
||||
interpolatedTerrainHeight += terrainZone.worldAltitude;
|
||||
|
||||
return interpolatedTerrainHeight;
|
||||
|
||||
Reference in New Issue
Block a user