add vec3.random_normal and fix entities cleanup moment

This commit is contained in:
MihailRis
2024-07-10 00:39:41 +03:00
parent d8c9fa1fe2
commit 257ba86183
4 changed files with 39 additions and 11 deletions
+1 -1
View File
@@ -31,7 +31,6 @@ void LevelController::update(float delta, bool input, bool pause) {
settings.chunks.padding.get() * 2);
chunks->update(settings.chunks.loadSpeed.get());
level->entities->clean();
if (!pause) {
// update all objects that needed
for (const auto& obj : level->objects) {
@@ -44,6 +43,7 @@ void LevelController::update(float delta, bool input, bool pause) {
level->entities->updatePhysics(delta);
level->entities->update();
}
level->entities->clean();
player->postUpdate(delta, input, pause);
// erease null pointers