summaryrefslogtreecommitdiffstats
path: root/src/Chunk.cpp
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2016-09-03 17:38:29 +0200
committerGitHub <noreply@github.com>2016-09-03 17:38:29 +0200
commit7e9e7f79110e398a4d2b07de3093eaccd551f013 (patch)
tree96098b99f146a40f42c4322d96fcd061b9548d8a /src/Chunk.cpp
parentEntities now bail out of ticks if destroyed (#3363) (diff)
downloadcuberite-7e9e7f79110e398a4d2b07de3093eaccd551f013.tar
cuberite-7e9e7f79110e398a4d2b07de3093eaccd551f013.tar.gz
cuberite-7e9e7f79110e398a4d2b07de3093eaccd551f013.tar.bz2
cuberite-7e9e7f79110e398a4d2b07de3093eaccd551f013.tar.lz
cuberite-7e9e7f79110e398a4d2b07de3093eaccd551f013.tar.xz
cuberite-7e9e7f79110e398a4d2b07de3093eaccd551f013.tar.zst
cuberite-7e9e7f79110e398a4d2b07de3093eaccd551f013.zip
Diffstat (limited to '')
-rw-r--r--src/Chunk.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Chunk.cpp b/src/Chunk.cpp
index 06d5eb319..d833feea5 100644
--- a/src/Chunk.cpp
+++ b/src/Chunk.cpp
@@ -223,6 +223,19 @@ bool cChunk::CanUnload(void)
+bool cChunk::CanUnloadAfterSaving(void)
+{
+ return
+ m_LoadedByClient.empty() && // The chunk is not used by any client
+ m_IsDirty && // The chunk is dirty
+ (m_StayCount == 0) && // The chunk is not in a ChunkStay
+ (m_Presence != cpQueued) ; // The chunk is not queued for loading / generating (otherwise multi-load / multi-gen could occur)
+}
+
+
+
+
+
void cChunk::MarkSaving(void)
{
m_IsSaving = true;