mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
fix destroyed entities validation
This commit is contained in:
parent
e11760a5e4
commit
4df0f4e1e4
2 changed files with 2 additions and 2 deletions
|
|
@ -34,7 +34,7 @@ entityid_t Entities::spawn(EntityDef& def, glm::vec3 pos) {
|
|||
}
|
||||
|
||||
void Entities::clean() {
|
||||
for (auto it = entities.begin(); it != entities.end(); ++it) {
|
||||
for (auto it = entities.begin(); it != entities.end();) {
|
||||
if (registry.valid(it->second)) {
|
||||
++it;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue