From 303ccd05b5c338a36c990f06bcd6acda444ae798 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sun, 23 Jul 2023 08:16:36 -0400 Subject: [PATCH] File structure update. --- src/engine/util/MapLoader.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/engine/util/MapLoader.java b/src/engine/util/MapLoader.java index 70c146cb..ef90ef1a 100644 --- a/src/engine/util/MapLoader.java +++ b/src/engine/util/MapLoader.java @@ -27,11 +27,12 @@ public enum MapLoader { long bytesRead = 0; long realmsWritten = 0; int realmUUID; + String mapPath = null; // Load image from disk try { - String mapPath = ConfigManager.DEFAULT_DATA_DIR + "realmmaps/" + ConfigManager.MB_WORLD_REALMMAP + ".png"; + mapPath = ConfigManager.DEFAULT_DATA_DIR + "realmmaps/" + ConfigManager.MB_WORLD_REALMMAP + ".png"; image = ImageIO.read(new File(mapPath)); // Array size determined by image size @@ -39,7 +40,7 @@ public enum MapLoader { MBServerStatics.SPATIAL_HASH_BUCKETSY = image.getHeight(); realmMap = new int[MBServerStatics.SPATIAL_HASH_BUCKETSX][MBServerStatics.SPATIAL_HASH_BUCKETSY]; } catch (IOException e) { - Logger.error("Error loading realm map: " + e.toString()); + Logger.error("Error loading realm map: " + mapPath); return null; }