mirror of
https://github.com/Ukendio/jecs.git
synced 2025-06-19 15:59:18 +00:00
Prevent partial matching of destroyed archetype
Some checks are pending
Some checks are pending
This commit is contained in:
parent
d505a0a38d
commit
8490dfd294
1 changed files with 3 additions and 0 deletions
|
@ -1934,6 +1934,9 @@ local function query_cached(query: ecs_query_data_t)
|
|||
|
||||
local function on_delete_callback(archetype)
|
||||
local i = table.find(archetypes, archetype) :: number
|
||||
if i == nil then
|
||||
return
|
||||
end
|
||||
local n = #archetypes
|
||||
archetypes[i] = archetypes[n]
|
||||
archetypes[n] = nil
|
||||
|
|
Loading…
Reference in a new issue