mirror of
https://github.com/Ukendio/jecs.git
synced 2026-02-04 15:15:21 +00:00
meow
This commit is contained in:
parent
82b1c94030
commit
9c96e10151
2 changed files with 17 additions and 10 deletions
|
|
@ -3869,12 +3869,19 @@ local function ecs_is_tag(world: world, id: i53): boolean
|
||||||
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
|
||||||
if ECS_IS_PAIR(id) then
|
local relation = entity_index_get_alive(entity_index, ECS_PAIR_FIRST(id)) :: i53
|
||||||
entity = entity_index_get_alive(entity_index, ECS_PAIR_FIRST(id)) :: i53
|
if not relation then
|
||||||
if not entity then return false end
|
return false
|
||||||
end
|
end
|
||||||
return not WORLD_HAS(world, entity, EcsComponent)
|
if WORLD_HAS(world, relation, EcsComponent) then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
local target = entity_index_get_alive(entity_index, ECS_PAIR_SECOND(id)) :: i53
|
||||||
|
if not target then return false end
|
||||||
|
return not WORLD_HAS(world, target, EcsComponent)
|
||||||
|
end
|
||||||
|
return not WORLD_HAS(world, id, EcsComponent)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function ecs_entity_record(world: world, entity: i53)
|
local function ecs_entity_record(world: world, entity: i53)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue