From 904a33418f061673c6f2a3e512a7d9328d24c537 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Mon, 15 Jul 2024 01:56:45 +0300 Subject: [PATCH] fix: entities marked to delete are still not deleted on loadEntities call --- src/objects/Entities.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/objects/Entities.cpp b/src/objects/Entities.cpp index 255cde09..27e6aef7 100644 --- a/src/objects/Entities.cpp +++ b/src/objects/Entities.cpp @@ -218,6 +218,7 @@ std::optional Entities::rayCast( } void Entities::loadEntities(dynamic::Map_sptr root) { + clean(); auto list = root->list("data"); for (size_t i = 0; i < list->size(); i++) { try {