📦Remove empty archetypes📦
This commit is contained in:
parent
cb05c2cf1d
commit
bcd5a8135d
1 changed files with 5 additions and 0 deletions
|
@ -319,6 +319,11 @@ namespace zecsy
|
||||||
|
|
||||||
archetypes[new_key].emplace_back(e);
|
archetypes[new_key].emplace_back(e);
|
||||||
|
|
||||||
|
if(archetypes[old_key].empty())
|
||||||
|
{
|
||||||
|
archetypes.erase(old_key);
|
||||||
|
}
|
||||||
|
|
||||||
auto& pool = pools[id];
|
auto& pool = pools[id];
|
||||||
auto index = pool.entity_to_index[e];
|
auto index = pool.entity_to_index[e];
|
||||||
pool.free_list.push_back(index);
|
pool.free_list.push_back(index);
|
||||||
|
|
Loading…
Reference in a new issue