diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-02-26 17:15:09 +0100 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-02-26 17:15:09 +0100 |
commit | b902546863c4b17c6d8ff3f198713aba7a8bbadd (patch) | |
tree | 35e67849dc70672b8ccfaf0aeb7e8d8293d639f4 /source/cChunk.h | |
parent | Attempt at fixing crashes with disconnecting players (diff) | |
download | cuberite-b902546863c4b17c6d8ff3f198713aba7a8bbadd.tar cuberite-b902546863c4b17c6d8ff3f198713aba7a8bbadd.tar.gz cuberite-b902546863c4b17c6d8ff3f198713aba7a8bbadd.tar.bz2 cuberite-b902546863c4b17c6d8ff3f198713aba7a8bbadd.tar.lz cuberite-b902546863c4b17c6d8ff3f198713aba7a8bbadd.tar.xz cuberite-b902546863c4b17c6d8ff3f198713aba7a8bbadd.tar.zst cuberite-b902546863c4b17c6d8ff3f198713aba7a8bbadd.zip |
Diffstat (limited to 'source/cChunk.h')
-rw-r--r-- | source/cChunk.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/cChunk.h b/source/cChunk.h index f0e47834d..3dc1c56fd 100644 --- a/source/cChunk.h +++ b/source/cChunk.h @@ -146,6 +146,9 @@ public: /// Returns true if there is a block entity at the coords specified
bool HasBlockEntityAt(int a_BlockX, int a_BlockY, int a_BlockZ);
+ /// Sets or resets the internal flag that prevents chunk from being unloaded
+ void Stay(bool a_Stay = true);
+
void Tick(float a_Dt, MTRand & a_TickRandom);
int GetPosX() { return m_PosX; }
@@ -238,6 +241,9 @@ private: cClientHandleList m_UnloadQuery;
cEntityList m_Entities;
cBlockEntityList m_BlockEntities;
+
+ /// Number of times the chunk has been requested to stay (by various cChunkStay objects); if zero, the chunk can be unloaded
+ int m_StayCount;
bool m_bCalculateLighting;
|