1
0

fix possibility of a twice generated chunk

This commit is contained in:
LO1ZB 2014-09-01 15:01:56 +02:00
parent ac95173e81
commit 4c9abab2d1

View File

@ -230,7 +230,6 @@ void cChunkGenerator::Execute(void)
}
cChunkCoords coords = m_Queue.front(); // Get next coord from queue
m_Queue.erase( m_Queue.begin()); // Remove coordinate from queue
bool SkipEnabled = (m_Queue.size() > QUEUE_SKIP_LIMIT);
Lock.Unlock(); // Unlock ASAP
m_evtRemoved.Set();
@ -254,6 +253,8 @@ void cChunkGenerator::Execute(void)
LOGD("Generating chunk [%d, %d]", coords.m_ChunkX, coords.m_ChunkZ);
DoGenerate(coords.m_ChunkX, coords.m_ChunkZ);
m_Queue.erase(m_Queue.begin()); // Remove coordinate from queue
NumChunksGenerated++;
} // while (!bStop)
}