Preparation for blend lerp insertion.

This commit is contained in:
2023-09-17 08:08:28 -04:00
parent d33ad0cdef
commit 240373898a
@@ -209,7 +209,9 @@ public class HeightMap {
public static float getWorldHeight(Zone currentZone, Vector3fImmutable worldLoc) {
Zone heightMapZone;
Zone parentZone;
float worldHeight;
float parentHeight;
// Seafloor is rather flat.
@@ -237,6 +239,11 @@ public class HeightMap {
return worldHeight;
}
// We will need the parent height if we got this far into the method
parentZone = HeightMap.getNextZoneWithTerrain(heightMapZone.getParent());
parentHeight = HeightMap.getWorldHeight(parentZone, worldLoc);
if (Bounds.collide(worldLoc, heightMapZone.minBlend) == true) {
// How far into blend zone are we?
@@ -246,6 +253,7 @@ public class HeightMap {
zoneLoc.y = abs(zoneLoc.x);
blendBounds.setBounds(new Vector2f(heightMapZone.absX, heightMapZone.absZ), zoneLoc, 0.0f);
}
// Position returned from Heightmap engine is relative to zone world height