forked from MagicBane/Server
Sea level logic updated.
This commit is contained in:
@@ -247,8 +247,15 @@ public class Zone extends AbstractGameObject {
|
|||||||
// Zone AABB is set here as it's coordinate space is world requiring a parent.
|
// Zone AABB is set here as it's coordinate space is world requiring a parent.
|
||||||
this.setBounds();
|
this.setBounds();
|
||||||
|
|
||||||
|
if (ZoneManager.getSeaFloor().equals(this)) {
|
||||||
|
this.seaLevel = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.getHeightMap() != null && this.getHeightMap().getSeaLevel() != 0)
|
if (this.getHeightMap() != null && this.getHeightMap().getSeaLevel() != 0)
|
||||||
this.seaLevel = this.getHeightMap().getSeaLevel();
|
this.seaLevel = this.worldAltitude + this.getHeightMap().getSeaLevel();
|
||||||
|
else
|
||||||
|
this.seaLevel = this.parent.seaLevel;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user