set generation/meshing queue flags before pushing to queues
parent
ca44c0f284
commit
da6ceeb605
|
@ -157,8 +157,8 @@ namespace chunkmanager
|
||||||
if(!c->getState(Chunk::CHUNK_STATE_GENERATED)){
|
if(!c->getState(Chunk::CHUNK_STATE_GENERATED)){
|
||||||
if(!c->getState(Chunk::CHUNK_STATE_IN_GENERATION_QUEUE)){
|
if(!c->getState(Chunk::CHUNK_STATE_IN_GENERATION_QUEUE)){
|
||||||
// Generate
|
// Generate
|
||||||
chunks_to_generate_queue.push(std::make_pair(c, GENERATION_PRIORITY_NORMAL));
|
|
||||||
c->setState(Chunk::CHUNK_STATE_IN_GENERATION_QUEUE, true);
|
c->setState(Chunk::CHUNK_STATE_IN_GENERATION_QUEUE, true);
|
||||||
|
chunks_to_generate_queue.push(std::make_pair(c, GENERATION_PRIORITY_NORMAL));
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
gen++;
|
gen++;
|
||||||
|
@ -167,8 +167,8 @@ namespace chunkmanager
|
||||||
if(!c->getState(Chunk::CHUNK_STATE_MESHED)){
|
if(!c->getState(Chunk::CHUNK_STATE_MESHED)){
|
||||||
if(!c->getState(Chunk::CHUNK_STATE_IN_MESHING_QUEUE)){
|
if(!c->getState(Chunk::CHUNK_STATE_IN_MESHING_QUEUE)){
|
||||||
// Mesh
|
// Mesh
|
||||||
chunks_to_mesh_queue.push(std::make_pair(c, MESHING_PRIORITY_NORMAL));
|
|
||||||
c->setState(Chunk::CHUNK_STATE_IN_MESHING_QUEUE, true);
|
c->setState(Chunk::CHUNK_STATE_IN_MESHING_QUEUE, true);
|
||||||
|
chunks_to_mesh_queue.push(std::make_pair(c, MESHING_PRIORITY_NORMAL));
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
mesh++;
|
mesh++;
|
||||||
|
|
Loading…
Reference in New Issue