Completed partial refactor.
This commit is contained in:
1 parent
4b62517d99
commit
df54840a88
6 files changed
+27
-72
No files matched your search
@@ -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