From 897ddfe77ac9af812e8ee98ff471025bcdac539d Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sun, 17 Sep 2023 23:53:06 -0400 Subject: [PATCH] Bounds must be set before setting parent. --- src/engine/objects/Zone.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/objects/Zone.java b/src/engine/objects/Zone.java index 3ff7891e..c682c0b1 100644 --- a/src/engine/objects/Zone.java +++ b/src/engine/objects/Zone.java @@ -84,8 +84,6 @@ public class Zone extends AbstractGameObject { this.minLvl = rs.getInt("minLvl"); this.maxLvl = rs.getInt("maxLvl"); - this.setBounds(); - //this needs to be here specifically for new zones created after server boot (e.g. player city zones) Zone parentZone = ZoneManager.getZoneByUUID(parentZoneID); @@ -247,6 +245,7 @@ public class Zone extends AbstractGameObject { this.absY = MBServerStatics.SEA_FLOOR_ALTITUDE; this.absZ = this.zCoord; this.seaLevel = 0; + this.setBounds(); return; } @@ -259,6 +258,7 @@ public class Zone extends AbstractGameObject { this.maxLvl = this.parent.maxLvl; } + this.setBounds(); this.worldAltitude = ZoneManager.caclulateWorldAltitude(this); if (this.getParent() == null) {