forked from MagicBane/Server
Update to world altitude calculation
This commit is contained in:
@@ -459,15 +459,21 @@ public enum ZoneManager {
|
||||
|
||||
float worldAlttitude = MBServerStatics.SEA_FLOOR_ALTITUDE;
|
||||
|
||||
if (getSeaFloor().getObjectUUID() == zone.getObjectUUID()) {
|
||||
|
||||
// Seafloor
|
||||
|
||||
if (zone.getParent() == null) {
|
||||
return worldAlttitude;
|
||||
}
|
||||
|
||||
Zone parentZone = zone.getParent();
|
||||
|
||||
if (getSeaFloor().getObjectUUID() == parentZone.getObjectUUID()) {
|
||||
// Child of seafloor
|
||||
|
||||
if (parentZone.getParent() == null)
|
||||
return worldAlttitude + zone.getYCoord();
|
||||
}
|
||||
|
||||
// return height from heightmap engine at zone location
|
||||
|
||||
worldAlttitude = HeightMap.getWorldHeight(parentZone, zone.getLoc());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user