From 902809b5145f1b1171b3846da15a76d02fcd9b3a Mon Sep 17 00:00:00 2001 From: Ukendio Date: Sat, 16 Nov 2024 17:11:24 +0100 Subject: [PATCH] Fix check in debug mode --- src/init.luau | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/init.luau b/src/init.luau index 2b96b0a..06c653c 100644 --- a/src/init.luau +++ b/src/init.luau @@ -1598,8 +1598,11 @@ if _G.__JECS_DEBUG then end end - local function ID_IS_TAG(world, id) - return not world_has_one_inline(world, ECS_ENTITY_T_HI(id), EcsComponent) + local function ID_IS_TAG(world: World, id) + if ECS_IS_PAIR(id) then + id = ecs_pair_first(world, id) + end + return not world_has_one_inline(world, id, EcsComponent) end World.query = function(world: World, ...) @@ -1886,6 +1889,5 @@ return { entity_index_try_get = entity_index_try_get, entity_index_try_get_any = entity_index_try_get_any, entity_index_is_alive = entity_index_is_alive, - entity_index_remove = entity_index_remove, entity_index_new_id = entity_index_new_id, }