diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-09-21 20:24:45 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-09-21 20:24:45 +0200 |
commit | cb709250779ee6e29d29cacff84e3980983dbd77 (patch) | |
tree | de6c6e90f5272a8f1083cc5b84b13c571d367288 /src/LineBlockTracer.cpp | |
parent | QtBiomeVisualiser: Added list of vanilla worlds. (diff) | |
download | cuberite-cb709250779ee6e29d29cacff84e3980983dbd77.tar cuberite-cb709250779ee6e29d29cacff84e3980983dbd77.tar.gz cuberite-cb709250779ee6e29d29cacff84e3980983dbd77.tar.bz2 cuberite-cb709250779ee6e29d29cacff84e3980983dbd77.tar.lz cuberite-cb709250779ee6e29d29cacff84e3980983dbd77.tar.xz cuberite-cb709250779ee6e29d29cacff84e3980983dbd77.tar.zst cuberite-cb709250779ee6e29d29cacff84e3980983dbd77.zip |
Diffstat (limited to '')
-rw-r--r-- | src/LineBlockTracer.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/LineBlockTracer.cpp b/src/LineBlockTracer.cpp index f03e796d1..71b8334fa 100644 --- a/src/LineBlockTracer.cpp +++ b/src/LineBlockTracer.cpp @@ -227,9 +227,11 @@ bool cLineBlockTracer::Item(cChunk * a_Chunk) } // Update the current chunk - if (a_Chunk != NULL) + a_Chunk = a_Chunk->GetNeighborChunk(m_CurrentX, m_CurrentZ); + if (a_Chunk == NULL) { - a_Chunk = a_Chunk->GetNeighborChunk(m_CurrentX, m_CurrentZ); + m_Callbacks->OnNoChunk(); + return false; } if (a_Chunk->IsValid()) @@ -245,13 +247,10 @@ bool cLineBlockTracer::Item(cChunk * a_Chunk) return false; } } - else + else if (m_Callbacks->OnNextBlockNoData(m_CurrentX, m_CurrentY, m_CurrentZ, m_CurrentFace)) { - if (m_Callbacks->OnNextBlockNoData(m_CurrentX, m_CurrentY, m_CurrentZ, m_CurrentFace)) - { - // The callback terminated the trace - return false; - } + // The callback terminated the trace + return false; } } } |