1
0

Fixed the extreme strain on the world tick thread.

Block changes were sent even with empty changesets, causing a lot of lost CPU cycles.
This commit is contained in:
madmaxoft
2013-08-19 21:55:03 +02:00
parent 53455a10fa
commit 94f8884f60
2 changed files with 7 additions and 0 deletions

View File

@@ -573,6 +573,11 @@ void cChunk::ProcessQueuedSetBlocks(void)
void cChunk::BroadcastPendingBlockChanges(void)
{
if (m_PendingSendBlocks.empty())
{
return;
}
for (cClientHandleList::iterator itr = m_LoadedByClient.begin(), end = m_LoadedByClient.end(); itr != end; ++itr)
{
(*itr)->SendBlockChanges(m_PosX, m_PosZ, m_PendingSendBlocks);