Fix removing packed entities
This commit is contained in:
parent
96d9a3e192
commit
a29cbf793e
1 changed files with 4 additions and 1 deletions
|
|
@ -131,7 +131,7 @@ namespace psemek::util
|
|||
else
|
||||
{
|
||||
// packed
|
||||
for (std::size_t i = 0; i < entity_count(); ++i)
|
||||
for (std::size_t i = 0; i < entity_count();)
|
||||
{
|
||||
ctx.entity = i;
|
||||
ctx.remove = false;
|
||||
|
|
@ -139,7 +139,10 @@ namespace psemek::util
|
|||
if (ctx.remove)
|
||||
remove_entity(i);
|
||||
else
|
||||
{
|
||||
std::apply(increment, cptrs);
|
||||
++i;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue