From 3a8d2aa421fcfa11a84a911aaaa6b5aa4e16cab3 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sat, 18 Feb 2012 20:10:57 +0000 Subject: Substantial cWorld::FastSetBlock() speed up by queueing all such calls and processing them later chunk-wise (makes growing trees in the generator fast again) git-svn-id: http://mc-server.googlecode.com/svn/trunk@295 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cWorld.h | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'source/cWorld.h') diff --git a/source/cWorld.h b/source/cWorld.h index 569fe8d32..a9c068336 100644 --- a/source/cWorld.h +++ b/source/cWorld.h @@ -183,21 +183,6 @@ private: friend class cRoot; - struct sSetBlockData - { - sSetBlockData( int a_X, int a_Y, int a_Z, char a_BlockID, char a_BlockMeta ) - : x( a_X ) - , y( a_Y ) - , z( a_Z ) - , BlockID( a_BlockID ) - , BlockMeta( a_BlockMeta ) - {} - int x, y, z; - char BlockID, BlockMeta; - }; - - typedef std::list< sSetBlockData > FastSetBlockList; - // This random generator is to be used only in the Tick() method, and thus only in the World-Tick-thread (MTRand is not exactly thread-safe) MTRand m_TickRand; @@ -252,7 +237,7 @@ private: cChunkCoordsList m_SpreadQueue; cCriticalSection m_CSFastSetBlock; - FastSetBlockList m_FastSetBlockQueue; + sSetBlockList m_FastSetBlockQueue; cChunkGenerator m_Generator; -- cgit v1.2.3