From c6d24d25ccf986a58d12c2785367812ce273184c Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sat, 7 Oct 2023 13:57:20 -0400 Subject: [PATCH] Method cleanup --- src/engine/gameManager/ZoneManager.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/engine/gameManager/ZoneManager.java b/src/engine/gameManager/ZoneManager.java index 95d6cedf..991a2b06 100644 --- a/src/engine/gameManager/ZoneManager.java +++ b/src/engine/gameManager/ZoneManager.java @@ -464,16 +464,14 @@ public enum ZoneManager { if (zone.parent == null) return worldAlttitude; - Zone parentZone = zone.parent; - // Children of seafloor - if (parentZone.parent == null) + if (ZoneManager.seaFloor.equals(zone.parent)) return worldAlttitude + zone.yOffset; // return height from heightmap engine at zone location - worldAlttitude = HeightMap.getWorldHeight(parentZone, zone.getLoc()); + worldAlttitude = HeightMap.getWorldHeight(zone.parent, zone.getLoc()); // Add zone offset to value