Browse Source

Preparation for blend lerp insertion.

magicbox-1.5.2
MagicBot 1 year ago
parent
commit
240373898a
  1. 8
      src/engine/InterestManagement/HeightMap.java

8
src/engine/InterestManagement/HeightMap.java

@ -209,7 +209,9 @@ public class HeightMap { @@ -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 { @@ -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 { @@ -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

Loading…
Cancel
Save