This commit is contained in:
Ardi 2026-01-04 09:39:50 -06:00 committed by GitHub
parent 3dab729df8
commit 82b1c94030
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3864,11 +3864,16 @@ local function world_new(DEBUG: boolean?)
return world return world
end end
local function ecs_is_tag(world: world, entity: i53): boolean local function ecs_is_tag(world: world, id: i53): boolean
local idr = world.component_index[entity] local idr = world.component_index[id]
if idr then if idr then
return bit32.btest(idr.flags, ECS_ID_IS_TAG) return bit32.btest(idr.flags, ECS_ID_IS_TAG)
end end
local entity = id
if ECS_IS_PAIR(id) then
entity = entity_index_get_alive(entity_index, ECS_PAIR_FIRST(id)) :: i53
if not entity then return false end
end
return not WORLD_HAS(world, entity, EcsComponent) return not WORLD_HAS(world, entity, EcsComponent)
end end