1
0

Merge branch 'master' into GeneratingBenchmark2

Conflicts:
	src/Blocks/BlockRail.h
	src/World.h
This commit is contained in:
Tycho
2014-01-26 06:28:51 -08:00
279 changed files with 2604 additions and 49505 deletions

View File

@@ -201,7 +201,7 @@ void cChunkGenerator::Execute(void)
while (!m_ShouldTerminate)
{
cCSLock Lock(m_CS);
while (m_Queue.size() == 0)
while (m_Queue.empty())
{
if ((NumChunksGenerated > 16) && (clock() - LastReportTick > CLOCKS_PER_SEC))
{
@@ -221,6 +221,13 @@ void cChunkGenerator::Execute(void)
LastReportTick = clock();
}
if (m_Queue.empty())
{
// Sometimes the queue remains empty
// If so, we can't do any front() operations on it!
continue;
}
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);