From 32880153ab76830311d8a1db3a157cd5ac6e5d9c Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Wed, 8 Feb 2012 12:36:54 +0000 Subject: MTRand class is not created in each tick, therefore much improving tick-thread time (now uses ~5 % CPU instead of one full core) git-svn-id: http://mc-server.googlecode.com/svn/trunk@245 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cChunkMap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/cChunkMap.cpp') diff --git a/source/cChunkMap.cpp b/source/cChunkMap.cpp index a5721026f..424b26b5f 100644 --- a/source/cChunkMap.cpp +++ b/source/cChunkMap.cpp @@ -349,7 +349,7 @@ cChunk* cChunkMap::GetChunk( int a_X, int a_Y, int a_Z ) -void cChunkMap::Tick( float a_Dt ) +void cChunkMap::Tick( float a_Dt, MTRand & a_TickRandom ) { for( int lay = 0; lay < m_NumLayers; ++lay ) { @@ -358,7 +358,7 @@ void cChunkMap::Tick( float a_Dt ) cChunk* Chunk = m_Layers[lay].m_Chunks[i].m_LiveChunk; if ( Chunk != NULL) { - Chunk->Tick( a_Dt ); + Chunk->Tick( a_Dt, a_TickRandom ); } } } // for lay - m_Layers[] -- cgit v1.2.3