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)
end
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
if world_target(world, child, relation) == delete then
world_remove(world, child, p)
end
end