From 279b7ca81db36c7c6e4e4e8c8650af3562add685 Mon Sep 17 00:00:00 2001 From: Katajisto Date: Tue, 29 Sep 2026 21:01:02 +0300 Subject: [PATCH] fix bounds bug --- src/editor/level_editor.jai | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/editor/level_editor.jai b/src/editor/level_editor.jai index 4c75e0f..9c25ad1 100644 --- a/src/editor/level_editor.jai +++ b/src/editor/level_editor.jai @@ -487,6 +487,7 @@ add_trile :: (name: string, x: s32, y: s32, z: s32, orientation: u8 = 0) { for *group: chunk.groups { if group.trile_name == name { array_add(*group.instances, inst); + recompute_group_bounds(group); added = true; break; } @@ -495,6 +496,7 @@ add_trile :: (name: string, x: s32, y: s32, z: s32, orientation: u8 = 0) { group: Chunk_Trile_Group; group.trile_name = sprint("%", name); array_add(*group.instances, inst); + recompute_group_bounds(*group); array_add(*chunk.groups, group); } invalidate_buried_around(*curworld.world, x, y, z); @@ -520,6 +522,7 @@ remove_trile :: (x: s32, y: s32, z: s32) { if group.is_buried.count > idx { array_unordered_remove_by_index(*group.is_buried, idx); } + recompute_group_bounds(group); removed = true; break; }