From da6ceeb6058f5aca93b7462f8dd0155ec951b0d4 Mon Sep 17 00:00:00 2001 From: EmaMaker Date: Tue, 3 Oct 2023 12:30:57 +0200 Subject: [PATCH] set generation/meshing queue flags before pushing to queues --- src/chunkmanager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chunkmanager.cpp b/src/chunkmanager.cpp index cc303cc..f4112a3 100644 --- a/src/chunkmanager.cpp +++ b/src/chunkmanager.cpp @@ -157,8 +157,8 @@ namespace chunkmanager if(!c->getState(Chunk::CHUNK_STATE_GENERATED)){ if(!c->getState(Chunk::CHUNK_STATE_IN_GENERATION_QUEUE)){ // Generate - chunks_to_generate_queue.push(std::make_pair(c, GENERATION_PRIORITY_NORMAL)); c->setState(Chunk::CHUNK_STATE_IN_GENERATION_QUEUE, true); + chunks_to_generate_queue.push(std::make_pair(c, GENERATION_PRIORITY_NORMAL)); } }else{ gen++; @@ -167,8 +167,8 @@ namespace chunkmanager if(!c->getState(Chunk::CHUNK_STATE_MESHED)){ if(!c->getState(Chunk::CHUNK_STATE_IN_MESHING_QUEUE)){ // Mesh - chunks_to_mesh_queue.push(std::make_pair(c, MESHING_PRIORITY_NORMAL)); c->setState(Chunk::CHUNK_STATE_IN_MESHING_QUEUE, true); + chunks_to_mesh_queue.push(std::make_pair(c, MESHING_PRIORITY_NORMAL)); } }else{ mesh++;