mirror of
https://github.com/Ukendio/jecs.git
synced 2025-09-23 08:39:16 +00:00
Fix bulk_insert not ensuring archetype ids are sorted
This commit is contained in:
parent
af093713b4
commit
f16a176beb
1 changed files with 3 additions and 1 deletions
|
@ -2050,7 +2050,9 @@ local function ecs_bulk_insert(world: world, entity: i53, ids: { i53 }, values:
|
|||
local from = r.archetype
|
||||
local component_index = world.component_index
|
||||
if not from then
|
||||
local dst_types = ids
|
||||
local dst_types = table.clone(ids)
|
||||
table.sort(dst_types)
|
||||
|
||||
local to = archetype_ensure(world, dst_types)
|
||||
new_entity(entity, r, to)
|
||||
local ROOT_ARCHETYPE = world.ROOT_ARCHETYPE
|
||||
|
|
Loading…
Reference in a new issue