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/cChunk.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'source/cChunk.h') diff --git a/source/cChunk.h b/source/cChunk.h index bd9882659..cd1122922 100644 --- a/source/cChunk.h +++ b/source/cChunk.h @@ -1,3 +1,4 @@ + #pragma once #define C_CHUNK_USE_INLINE 1 @@ -14,14 +15,23 @@ namespace Json class Value; }; + + + + class cWorld; -class cCriticalSection; class cFurnaceEntity; class cPacket; class cBlockEntity; class cEntity; class cClientHandle; class cServer; +class MTRand; + + + + + class cChunk { public: @@ -30,7 +40,7 @@ public: void Initialize(); - void Tick(float a_Dt); + void Tick(float a_Dt, MTRand & a_TickRandom); int GetPosX() { return m_PosX; } int GetPosY() { return m_PosY; } -- cgit v1.2.3