summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-16 17:50:11 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-16 17:50:11 +0100
commit415d4eaa68416ca733383598f73c0278b3bce276 (patch)
tree293a39df7a52b2a54ca8f3a620313ec82d8b0ece
parentMarking chunk dirty after generating (diff)
downloadcuberite-415d4eaa68416ca733383598f73c0278b3bce276.tar
cuberite-415d4eaa68416ca733383598f73c0278b3bce276.tar.gz
cuberite-415d4eaa68416ca733383598f73c0278b3bce276.tar.bz2
cuberite-415d4eaa68416ca733383598f73c0278b3bce276.tar.lz
cuberite-415d4eaa68416ca733383598f73c0278b3bce276.tar.xz
cuberite-415d4eaa68416ca733383598f73c0278b3bce276.tar.zst
cuberite-415d4eaa68416ca733383598f73c0278b3bce276.zip
-rw-r--r--source/WorldStorage.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/source/WorldStorage.cpp b/source/WorldStorage.cpp
index 50c89cf7e..73ad18f15 100644
--- a/source/WorldStorage.cpp
+++ b/source/WorldStorage.cpp
@@ -308,9 +308,17 @@ bool cWorldStorage::SaveOneChunk(void)
}
HasMore = (m_SaveQueue.size() > 0);
}
- if (ShouldSave && !m_SaveSchema->SaveChunk(Save))
+ if (ShouldSave)
{
- LOGWARNING("Cannot save chunk [%d, %d]", Save.m_ChunkX, Save.m_ChunkZ);
+ m_World->MarkChunkSaving(Save.m_ChunkX, 0, Save.m_ChunkZ);
+ if (m_SaveSchema->SaveChunk(Save))
+ {
+ m_World->MarkChunkSaved(Save.m_ChunkX, 0, Save.m_ChunkZ);
+ }
+ else
+ {
+ LOGWARNING("Cannot save chunk [%d, %d]", Save.m_ChunkX, Save.m_ChunkZ);
+ }
}
return HasMore;
}