mirror of
https://github.com/Ukendio/jecs.git
synced 2025-04-25 01:20:04 +00:00
Swap remove in without
This commit is contained in:
parent
5fd7e19a30
commit
207c9b5268
1 changed files with 7 additions and 2 deletions
|
@ -833,8 +833,13 @@ do
|
||||||
end
|
end
|
||||||
|
|
||||||
if shouldRemove then
|
if shouldRemove then
|
||||||
table.remove(compatible_archetypes, i)
|
local last = #compatible_archetypes
|
||||||
table.remove(column_indices, i)
|
if last ~= i then
|
||||||
|
compatible_archetypes[i] = compatible_archetypes[last]
|
||||||
|
column_indices[i] = column_indices[last]
|
||||||
|
end
|
||||||
|
compatible_archetypes[last] = nil
|
||||||
|
column_indices[last] = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue