mirror of
https://github.com/Ukendio/jecs.git
synced 2026-02-04 15:15:21 +00:00
fix
This commit is contained in:
parent
3dab729df8
commit
82b1c94030
1 changed files with 7 additions and 2 deletions
|
|
@ -3864,11 +3864,16 @@ local function world_new(DEBUG: boolean?)
|
|||
return world
|
||||
end
|
||||
|
||||
local function ecs_is_tag(world: world, entity: i53): boolean
|
||||
local idr = world.component_index[entity]
|
||||
local function ecs_is_tag(world: world, id: i53): boolean
|
||||
local idr = world.component_index[id]
|
||||
if idr then
|
||||
return bit32.btest(idr.flags, ECS_ID_IS_TAG)
|
||||
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)
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue