summaryrefslogtreecommitdiffstats
path: root/src/LineBlockTracer.cpp
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2017-09-02 09:45:06 +0200
committerAlexander Harkness <me@bearbin.net>2017-09-02 09:50:23 +0200
commit49c443896dcac8c4eaf08c4024e8bd2366ad899a (patch)
treeb1ec46cab2b4e5731860c7136f1bbfca6fe9d458 /src/LineBlockTracer.cpp
parentSetSwimState now takes into account head height (diff)
downloadcuberite-49c443896dcac8c4eaf08c4024e8bd2366ad899a.tar
cuberite-49c443896dcac8c4eaf08c4024e8bd2366ad899a.tar.gz
cuberite-49c443896dcac8c4eaf08c4024e8bd2366ad899a.tar.bz2
cuberite-49c443896dcac8c4eaf08c4024e8bd2366ad899a.tar.lz
cuberite-49c443896dcac8c4eaf08c4024e8bd2366ad899a.tar.xz
cuberite-49c443896dcac8c4eaf08c4024e8bd2366ad899a.tar.zst
cuberite-49c443896dcac8c4eaf08c4024e8bd2366ad899a.zip
Diffstat (limited to 'src/LineBlockTracer.cpp')
-rw-r--r--src/LineBlockTracer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/LineBlockTracer.cpp b/src/LineBlockTracer.cpp
index e194ae653..471d9e13b 100644
--- a/src/LineBlockTracer.cpp
+++ b/src/LineBlockTracer.cpp
@@ -199,12 +199,12 @@ bool cLineBlockTracer::Trace(double a_StartX, double a_StartY, double a_StartZ,
m_DiffY = m_EndY - m_StartY;
m_DiffZ = m_EndZ - m_StartZ;
- // The actual trace is handled with ChunkMapCS locked by calling our ChunkCallback for the specified chunk
+ // The actual trace is handled with ChunkMapCS locked by calling our Item() for the specified chunk
int BlockX = FloorC(m_StartX);
int BlockZ = FloorC(m_StartZ);
int ChunkX, ChunkZ;
cChunkDef::BlockToChunk(BlockX, BlockZ, ChunkX, ChunkZ);
- return m_World->DoWithChunk(ChunkX, ChunkZ, [this](cChunk & a_Chunk) { return ChunkCallback(&a_Chunk); });
+ return m_World->DoWithChunk(ChunkX, ChunkZ, *this);
}
@@ -308,7 +308,7 @@ bool cLineBlockTracer::MoveToNextBlock(void)
-bool cLineBlockTracer::ChunkCallback(cChunk * a_Chunk)
+bool cLineBlockTracer::Item(cChunk * a_Chunk)
{
ASSERT((m_CurrentY >= 0) && (m_CurrentY < cChunkDef::Height)); // This should be provided by FixStartAboveWorld() / FixStartBelowWorld()