mirror of
https://github.com/Ukendio/jecs.git
synced 2025-04-24 17:10:03 +00:00
Merge 870823f9fc
into b29f6c5037
This commit is contained in:
commit
fc503f1c26
1 changed files with 3 additions and 8 deletions
11
jecs.luau
11
jecs.luau
|
@ -1152,21 +1152,16 @@ do
|
||||||
|
|
||||||
if idr_t then
|
if idr_t then
|
||||||
for archetype_id in idr_t.columns do
|
for archetype_id in idr_t.columns do
|
||||||
local children = {}
|
|
||||||
local idr_t_archetype = archetypes[archetype_id]
|
local idr_t_archetype = archetypes[archetype_id]
|
||||||
|
|
||||||
local idr_t_types = idr_t_archetype.types
|
local idr_t_types = idr_t_archetype.types
|
||||||
|
local children = table.clone(idr_t_archetype.entities)
|
||||||
for _, child in idr_t_archetype.entities do
|
|
||||||
table.insert(children, child)
|
|
||||||
end
|
|
||||||
|
|
||||||
local n = #children
|
local n = #children
|
||||||
|
|
||||||
for _, id in idr_t_types do
|
for _, id in idr_t_types do
|
||||||
if not ECS_IS_PAIR(id) then
|
if not ECS_IS_PAIR(id) then
|
||||||
continue
|
continue
|
||||||
end
|
end
|
||||||
|
|
||||||
local object = ecs_pair_second(world, id)
|
local object = ecs_pair_second(world, id)
|
||||||
if object == delete then
|
if object == delete then
|
||||||
local id_record = component_index[id]
|
local id_record = component_index[id]
|
||||||
|
@ -1186,8 +1181,8 @@ do
|
||||||
if on_remove then
|
if on_remove then
|
||||||
on_remove(child)
|
on_remove(child)
|
||||||
end
|
end
|
||||||
local r = sparse_array[ECS_ENTITY_T_LO(child)]
|
|
||||||
if not empty then
|
if not empty then
|
||||||
|
local r = sparse_array[ECS_ENTITY_T_LO(child)]
|
||||||
entity_move(entity_index, child, r, to)
|
entity_move(entity_index, child, r, to)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue