Should set tags after builtin components

This commit is contained in:
Ukendio 2025-04-26 02:03:39 +02:00
parent fd2c57fe17
commit 1225f205a8

View file

@ -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