mirror of
https://github.com/Ukendio/jecs.git
synced 2025-06-20 08:19: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 function on_delete_callback(archetype)
|
||||||
local i = table.find(archetypes, archetype) :: number
|
local i = table.find(archetypes, archetype) :: number
|
||||||
|
if i == nil then
|
||||||
|
return
|
||||||
|
end
|
||||||
local n = #archetypes
|
local n = #archetypes
|
||||||
archetypes[i] = archetypes[n]
|
archetypes[i] = archetypes[n]
|
||||||
archetypes[n] = nil
|
archetypes[n] = nil
|
||||||
|
|
Loading…
Reference in a new issue