From 415d4eaa68416ca733383598f73c0278b3bce276 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Thu, 16 Feb 2012 16:50:11 +0000 Subject: Chunks are now marked as saved git-svn-id: http://mc-server.googlecode.com/svn/trunk@277 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/WorldStorage.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'source') 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; } -- cgit v1.2.3