From 743c526b46a1d1c6e0b7ef8b9b0f10b22ee43ab3 Mon Sep 17 00:00:00 2001 From: dusoleil Date: Tue, 20 Sep 2022 18:52:46 -0400 Subject: Simplify and Fix Monument Code Simplify the monument chunks to just be a bounding box with the scene origin at the center. This allows us to automatically calculate the chunks with only the bounds provided. It also fixes the issues with scaling and rotation. --- world/chunk/ChunkLoader.gd | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'world/chunk/ChunkLoader.gd') diff --git a/world/chunk/ChunkLoader.gd b/world/chunk/ChunkLoader.gd index 0ea422a..5b1c2c0 100644 --- a/world/chunk/ChunkLoader.gd +++ b/world/chunk/ChunkLoader.gd @@ -126,6 +126,5 @@ func finish_chunk(chunk): var coords = v2_coords(chunk.transform.origin) loaded_chunks[coords] = weakref(chunk) var monument = ChunkGen.get_monument_at_chunk(coords) - if monument != null: - if monument.loaded_chunk == null: + if monument != null && monument.loaded_chunk == null: monument.loaded_chunk = coords -- cgit v1.2.3