forked from MagicBane/Server
Comment and name cleanup
This commit is contained in:
@@ -212,7 +212,7 @@ public class HeightMap {
|
||||
Zone heightMapZone;
|
||||
Zone parentZone;
|
||||
float worldHeight;
|
||||
float parentHeight;
|
||||
float interpolatedParentTerrainHeight;
|
||||
|
||||
// Seafloor is rather flat.
|
||||
|
||||
@@ -242,12 +242,12 @@ public class HeightMap {
|
||||
// We will need the parent height if we got this far into the method
|
||||
|
||||
parentZone = HeightMap.getNextZoneWithTerrain(heightMapZone.getParent());
|
||||
parentHeight = HeightMap.getWorldHeight(parentZone, worldLoc);
|
||||
interpolatedParentTerrainHeight = HeightMap.getWorldHeight(parentZone, worldLoc);
|
||||
|
||||
// Between maxBlend and minBlend distance from edge of zone we LERP between the two heights
|
||||
|
||||
if (Bounds.collide(worldLoc, heightMapZone.minBlend) == true) {
|
||||
|
||||
// How far into blend zone are we?
|
||||
|
||||
Bounds blendBounds = Bounds.borrow();
|
||||
zoneLoc.x = abs(zoneLoc.x);
|
||||
zoneLoc.y = abs(zoneLoc.x);
|
||||
@@ -260,14 +260,14 @@ public class HeightMap {
|
||||
|
||||
float areaDelta = childArea / parentArea;
|
||||
|
||||
interpolatedTerrainHeight = FastMath.LERP(areaDelta, interpolatedTerrainHeight, parentHeight);
|
||||
interpolatedTerrainHeight = FastMath.LERP(areaDelta, interpolatedTerrainHeight, interpolatedParentTerrainHeight);
|
||||
return interpolatedTerrainHeight + heightMapZone.worldAltitude;
|
||||
|
||||
}
|
||||
|
||||
// Past min blend we just return the parent height.
|
||||
|
||||
return parentHeight + heightMapZone.worldAltitude;
|
||||
return interpolatedParentTerrainHeight + heightMapZone.worldAltitude;
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user