forked from MagicBane/Server
Blend function installed
This commit is contained in:
@@ -103,8 +103,8 @@ public class Terrain {
|
|||||||
|
|
||||||
// Interpolate height for this position in terrain
|
// Interpolate height for this position in terrain
|
||||||
|
|
||||||
float interpolatedTerrainHeight = terrainZone.terrain.getInterpolatedTerrainHeight(terrainLoc);
|
float interpolatedChildHeight = terrainZone.terrain.getInterpolatedTerrainHeight(terrainLoc);
|
||||||
interpolatedTerrainHeight += terrainZone.worldAltitude;
|
interpolatedChildHeight += terrainZone.worldAltitude;
|
||||||
|
|
||||||
// Interpolate height for this position in parent
|
// Interpolate height for this position in parent
|
||||||
|
|
||||||
@@ -113,9 +113,7 @@ public class Terrain {
|
|||||||
|
|
||||||
// Blend between heights
|
// Blend between heights
|
||||||
|
|
||||||
interpolatedTerrainHeight = interpolatedTerrainHeight + interpolatedParentTerrainHeight * (1 - terrainZone.terrain.heightBlend(terrainLoc));
|
return interpolatedChildHeight + interpolatedParentTerrainHeight * (1 - parentZone.terrain.heightBlend(parentLoc));
|
||||||
|
|
||||||
return interpolatedTerrainHeight;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -229,13 +229,7 @@ public class Zone extends AbstractGameObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.setBounds();
|
this.setBounds();
|
||||||
|
this.worldAltitude = ZoneManager.caclulateWorldAltitude(this);
|
||||||
try {
|
|
||||||
this.worldAltitude = ZoneManager.caclulateWorldAltitude(this);
|
|
||||||
} catch (Exception e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
setSeaLevel();
|
setSeaLevel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user