diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-02-21 17:27:30 +0100 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-02-21 17:27:30 +0100 |
commit | b653e6a01271c05bdbd947ab7120d10d30ecee91 (patch) | |
tree | 43d7a6e5ce26b77d1c759a8dc0cc533a13a933e7 /source/cChunk.h | |
parent | Fixed heightmap optimization from rev 302; removed a few more cChunkPtrs (diff) | |
download | cuberite-b653e6a01271c05bdbd947ab7120d10d30ecee91.tar cuberite-b653e6a01271c05bdbd947ab7120d10d30ecee91.tar.gz cuberite-b653e6a01271c05bdbd947ab7120d10d30ecee91.tar.bz2 cuberite-b653e6a01271c05bdbd947ab7120d10d30ecee91.tar.lz cuberite-b653e6a01271c05bdbd947ab7120d10d30ecee91.tar.xz cuberite-b653e6a01271c05bdbd947ab7120d10d30ecee91.tar.zst cuberite-b653e6a01271c05bdbd947ab7120d10d30ecee91.zip |
Diffstat (limited to '')
-rw-r--r-- | source/cChunk.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/cChunk.h b/source/cChunk.h index bbeb2f1b4..2fec4bcbe 100644 --- a/source/cChunk.h +++ b/source/cChunk.h @@ -46,10 +46,15 @@ class cClientHandle; class cServer;
class MTRand;
class cPlayer;
+class cChunkMap;
typedef std::list<cClientHandle *> cClientHandleList;
typedef std::list<cBlockEntity *> cBlockEntityList;
+
+
+
+
/** Interface class used for getting data out of a chunk using the GetAllData() function.
Implementation must use the pointers immediately and NOT store any of them for later use
*/
@@ -108,7 +113,7 @@ public: static const int c_NumBlocks = 16 * 128 * 16;
static const int c_BlockDataSize = c_NumBlocks * 2 + (c_NumBlocks/2); // 2.5 * numblocks
- cChunk(int a_X, int a_Y, int a_Z, cWorld* a_World);
+ cChunk(int a_X, int a_Y, int a_Z, cChunkMap * a_ChunkMap, cWorld * a_World);
~cChunk();
bool IsValid(void) const {return m_IsValid; } // Returns true if the chunk is valid (loaded / generated)
@@ -248,7 +253,8 @@ private: bool m_bCalculateHeightmap;
int m_PosX, m_PosY, m_PosZ;
- cWorld * m_World;
+ cWorld * m_World;
+ cChunkMap * m_ChunkMap;
char m_BlockData[c_BlockDataSize]; // Chunk data ready to be compressed and sent
char *m_BlockType; // Pointers to an element in m_BlockData
|