From 1225f205a8f05a79d324a9c168f201d935494bb0 Mon Sep 17 00:00:00 2001 From: Ukendio Date: Sat, 26 Apr 2025 02:03:39 +0200 Subject: [PATCH] Should set tags after builtin components --- jecs.luau | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/jecs.luau b/jecs.luau index 94415af..c504920 100644 --- a/jecs.luau +++ b/jecs.luau @@ -2482,12 +2482,6 @@ local function world_new() entity_index_new_id(entity_index) end - for i = EcsRest + 1, ecs_max_tag_id do - -- Initialize built-in components - entity_index_new_id(entity_index) - print("hm...", i) - end - world_add(self, EcsName, EcsComponent) world_add(self, EcsOnChange, EcsComponent) world_add(self, EcsOnAdd, EcsComponent) @@ -2510,6 +2504,10 @@ local function world_new() world_add(self, EcsChildOf, ECS_PAIR(EcsOnDeleteTarget, EcsDelete)) + for i = EcsRest + 1, ecs_max_tag_id do + entity_index_new_id(entity_index) + end + for i, bundle in ecs_metadata do for ty, value in bundle do if value == NULL then