From e2f1cf51c759f0c70bc1dc9f1db3a8575e1db10f Mon Sep 17 00:00:00 2001 From: faketruth Date: Mon, 31 Oct 2011 00:52:20 +0000 Subject: Prepared some parts of the code for multi world support, I created lots of TODO's git-svn-id: http://mc-server.googlecode.com/svn/trunk@29 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cChunk.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'source/cChunk.h') diff --git a/source/cChunk.h b/source/cChunk.h index d90e817cf..c8db5f69c 100644 --- a/source/cChunk.h +++ b/source/cChunk.h @@ -7,6 +7,7 @@ namespace Json class Value; }; +class cWorld; class cCriticalSection; class cFurnaceEntity; class cPacket; @@ -17,16 +18,17 @@ class cServer; class cChunk { public: - cChunk(int a_X, int a_Y, int a_Z); + cChunk(int a_X, int a_Y, int a_Z, cWorld* a_World); ~cChunk(); void Initialize(); void Tick(float a_Dt); - inline int GetPosX() { return m_PosX; } - inline int GetPosY() { return m_PosY; } - inline int GetPosZ() { return m_PosZ; } + int GetPosX() { return m_PosX; } + int GetPosY() { return m_PosY; } + int GetPosZ() { return m_PosZ; } + cWorld* GetWorld() { return m_World; } void Send( cClientHandle* a_Client ); void AsyncUnload( cClientHandle* a_Client ); @@ -112,6 +114,7 @@ private: bool m_bCalculateHeightmap; int m_PosX, m_PosY, m_PosZ; + cWorld* m_World; char m_BlockData[c_BlockDataSize]; // Chunk data ready to be compressed and sent char *m_BlockType; // Pointers to an element in m_BlockData -- cgit v1.2.3