Browse Source

Modified sequencing

magicbox-1.5.2
MagicBot 1 year ago
parent
commit
cc7d741681
  1. 9
      src/engine/objects/Zone.java

9
src/engine/objects/Zone.java

@ -165,12 +165,16 @@ public class Zone extends AbstractWorldObject {
if (ZoneManager.seaFloor == null) if (ZoneManager.seaFloor == null)
ZoneManager.seaFloor = this; ZoneManager.seaFloor = this;
this.setParent();
this.setBounds();
if (this.template.terrain_type.equals("NONE")) if (this.template.terrain_type.equals("NONE"))
this.terrain = null; this.terrain = null;
else else
this.terrain = new Terrain(this); this.terrain = new Terrain(this);
this.setParent(); this.global_height = ZoneManager.calculateGlobalZoneHeight(this);
setSeaLevel();
if (this.min_level == 0 && this.parent != null) { if (this.min_level == 0 && this.parent != null) {
this.min_level = this.parent.min_level; this.min_level = this.parent.min_level;
@ -222,9 +226,6 @@ public class Zone extends AbstractWorldObject {
this.max_level = this.parent.max_level; this.max_level = this.parent.max_level;
} }
this.setBounds();
this.global_height = ZoneManager.calculateGlobalZoneHeight(this);
setSeaLevel();
} }
private void setSeaLevel() { private void setSeaLevel() {

Loading…
Cancel
Save