mirror of
https://github.com/Ukendio/jecs.git
synced 2025-04-24 17:10:03 +00:00
Save sparse_array as variable
This commit is contained in:
parent
95b166eca3
commit
fbbb1de1df
1 changed files with 3 additions and 2 deletions
|
@ -987,8 +987,9 @@ do
|
||||||
|
|
||||||
function world_delete(world: World, entity: i53, destruct: boolean?)
|
function world_delete(world: World, entity: i53, destruct: boolean?)
|
||||||
local entityIndex = world.entityIndex
|
local entityIndex = world.entityIndex
|
||||||
|
local sparse_array = entityIndex.sparse
|
||||||
|
|
||||||
local record = entityIndex.sparse[entity]
|
local record = sparse_array[entity]
|
||||||
if not record then
|
if not record then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
@ -1071,7 +1072,7 @@ do
|
||||||
end
|
end
|
||||||
|
|
||||||
record.archetype = nil :: any
|
record.archetype = nil :: any
|
||||||
entityIndex.sparse[entity] = nil
|
sparse_array[entity] = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue