mirror of
https://github.com/Ukendio/jecs.git
synced 2025-04-25 09:30:03 +00:00
optimize bulk remove
This commit is contained in:
parent
c22007671d
commit
49d5bd0d4a
1 changed files with 4 additions and 4 deletions
|
@ -801,10 +801,10 @@ local function archetype_delete(world: World, archetype,
|
||||||
world_delete(world, child)
|
world_delete(world, child)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
local p = ECS_PAIR(relation, delete)
|
local object = ECS_ENTITY_T_LO(id)
|
||||||
|
if object == delete then
|
||||||
|
local p = ECS_PAIR(relation, object)
|
||||||
for _, child in children do
|
for _, child in children do
|
||||||
if world_target(world, child, relation) == delete then
|
|
||||||
world_remove(world, child, p)
|
world_remove(world, child, p)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue