From 94f8884f607deffb486f74a753dca2ea9c84cdbc Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Mon, 19 Aug 2013 21:55:03 +0200 Subject: Fixed the extreme strain on the world tick thread. Block changes were sent even with empty changesets, causing a lot of lost CPU cycles. --- source/ClientHandle.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/ClientHandle.cpp') diff --git a/source/ClientHandle.cpp b/source/ClientHandle.cpp index 07d580085..57830f63c 100644 --- a/source/ClientHandle.cpp +++ b/source/ClientHandle.cpp @@ -1502,6 +1502,8 @@ void cClientHandle::SendBlockChange(int a_BlockX, int a_BlockY, int a_BlockZ, BL void cClientHandle::SendBlockChanges(int a_ChunkX, int a_ChunkZ, const sSetBlockVector & a_Changes) { + ASSERT(!a_Changes.empty()); // We don't want to be sending empty change packets! + m_Protocol->SendBlockChanges(a_ChunkX, a_ChunkZ, a_Changes); } -- cgit v1.2.3