diff options
author | madmaxoft <github@xoft.cz> | 2014-02-10 22:47:10 +0100 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-02-10 22:47:10 +0100 |
commit | 9cebc9157cf43ba639227b9d79b980b3613dda1e (patch) | |
tree | 9c61bbee8a94668703c316f1c300187d247093f9 /src/ChunkStay.cpp | |
parent | cLuaState: Stack traces don't include ghost 0-th element. (diff) | |
download | cuberite-9cebc9157cf43ba639227b9d79b980b3613dda1e.tar cuberite-9cebc9157cf43ba639227b9d79b980b3613dda1e.tar.gz cuberite-9cebc9157cf43ba639227b9d79b980b3613dda1e.tar.bz2 cuberite-9cebc9157cf43ba639227b9d79b980b3613dda1e.tar.lz cuberite-9cebc9157cf43ba639227b9d79b980b3613dda1e.tar.xz cuberite-9cebc9157cf43ba639227b9d79b980b3613dda1e.tar.zst cuberite-9cebc9157cf43ba639227b9d79b980b3613dda1e.zip |
Diffstat (limited to '')
-rw-r--r-- | src/ChunkStay.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ChunkStay.cpp b/src/ChunkStay.cpp index cce8d5f4d..6b1d5ee34 100644 --- a/src/ChunkStay.cpp +++ b/src/ChunkStay.cpp @@ -105,7 +105,7 @@ void cChunkStay::Disable(void) -void cChunkStay::ChunkAvailable(int a_ChunkX, int a_ChunkZ) +bool cChunkStay::ChunkAvailable(int a_ChunkX, int a_ChunkZ) { // Check if this is a chunk that we want: bool IsMine = false; @@ -120,15 +120,16 @@ void cChunkStay::ChunkAvailable(int a_ChunkX, int a_ChunkZ) } // for itr - m_OutstandingChunks[] if (!IsMine) { - return; + return false; } // Call the appropriate callbacks: OnChunkAvailable(a_ChunkX, a_ChunkZ); if (m_OutstandingChunks.empty()) { - OnAllChunksAvailable(); + return OnAllChunksAvailable(); } + return false; } |