Browse Source

World altitude set in setparent.

feature-region-set
MagicBot 1 year ago
parent
commit
e26121177f
  1. 4
      src/engine/objects/Zone.java
  2. 1
      src/engine/server/world/WorldServer.java

4
src/engine/objects/Zone.java

@ -251,10 +251,12 @@ public class Zone extends AbstractGameObject {
this.maxLvl = this.parent.maxLvl; this.maxLvl = this.parent.maxLvl;
} }
this.worldAltitude = ZoneManager.caclulateWorldAltitude(this);
this.setBounds(); this.setBounds();
if (this.getParent() == null) { if (this.getParent() == null) {
this.seaLevel = 0; this.seaLevel = MBServerStatics.SEA_FLOOR_ALTITUDE;
return; return;
} }

1
src/engine/server/world/WorldServer.java

@ -566,7 +566,6 @@ public class WorldServer {
for (Zone zone : rootParent) { for (Zone zone : rootParent) {
ZoneManager.addZone(zone.getLoadNum(), zone); ZoneManager.addZone(zone.getLoadNum(), zone);
zone.worldAltitude = ZoneManager.caclulateWorldAltitude(zone);
//Handle Buildings //Handle Buildings

Loading…
Cancel
Save