From 13163ddb7e02628b7894176dd765b2cd7745ae5d Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sun, 8 Oct 2023 22:44:34 -0400 Subject: [PATCH] Error logging added --- src/engine/InterestManagement/Terrain.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/engine/InterestManagement/Terrain.java b/src/engine/InterestManagement/Terrain.java index ef650d82..488c97b5 100644 --- a/src/engine/InterestManagement/Terrain.java +++ b/src/engine/InterestManagement/Terrain.java @@ -12,6 +12,7 @@ import engine.gameManager.ZoneManager; import engine.math.Vector2f; import engine.math.Vector3fImmutable; import engine.objects.Zone; +import org.pmw.tinylog.Logger; import java.util.HashMap; @@ -42,6 +43,9 @@ public class Terrain { this.terrain_pixel_data = Terrain._heightmap_pixel_cache.get(heightmap); + if (terrain_pixel_data == null) + Logger.error("Pixel map empty"); + this.cell_count.x = this.terrain_pixel_data.length - 1; this.cell_count.y = this.terrain_pixel_data[0].length - 1;