From 3737a6eace2deb9e75bc4f70be8f330ea8c8d66e Mon Sep 17 00:00:00 2001 From: MagicBot Date: Tue, 12 Sep 2023 15:18:09 -0400 Subject: [PATCH] Sea level logic updated. --- src/engine/objects/Zone.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/engine/objects/Zone.java b/src/engine/objects/Zone.java index 07b00520..edec6d7a 100644 --- a/src/engine/objects/Zone.java +++ b/src/engine/objects/Zone.java @@ -231,8 +231,6 @@ public class Zone extends AbstractGameObject { // Zone AABB is set here as it's coordinate space is world requiring a parent. - this.setBounds(); - // Seafloor if (this.parent == null) { @@ -240,6 +238,7 @@ public class Zone extends AbstractGameObject { this.absY = MBServerStatics.SEA_FLOOR_ALTITUDE; this.absZ = this.zCoord; this.seaLevel = 0; + this.setBounds(); return; } @@ -252,6 +251,8 @@ public class Zone extends AbstractGameObject { this.maxLvl = this.parent.maxLvl; } + this.setBounds(); + if (this.getHeightMap() != null && this.getHeightMap().getSeaLevel() != 0) this.seaLevel = this.worldAltitude + this.getHeightMap().getSeaLevel(); else