optimize bulk remove

This commit is contained in:
Ukendio 2024-08-13 21:23:40 +02:00
parent c22007671d
commit 49d5bd0d4a

View file

@ -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
for _, child in children do local p = ECS_PAIR(relation, object)
if world_target(world, child, relation) == delete then for _, child in children do
world_remove(world, child, p) world_remove(world, child, p)
end end
end end