summaryrefslogtreecommitdiffstats
path: root/src/LineBlockTracer.cpp
diff options
context:
space:
mode:
authorpeterbell10 <peterbell10@live.co.uk>2017-09-01 13:04:50 +0200
committerMattes D <github@xoft.cz>2017-09-01 13:04:50 +0200
commit496c337cdfa593654018c171f6a74c28272265b5 (patch)
treefab48316d8fd6de97500ca1b8c8c5792eb578acc /src/LineBlockTracer.cpp
parentUpdate Core plugin (diff)
downloadcuberite-496c337cdfa593654018c171f6a74c28272265b5.tar
cuberite-496c337cdfa593654018c171f6a74c28272265b5.tar.gz
cuberite-496c337cdfa593654018c171f6a74c28272265b5.tar.bz2
cuberite-496c337cdfa593654018c171f6a74c28272265b5.tar.lz
cuberite-496c337cdfa593654018c171f6a74c28272265b5.tar.xz
cuberite-496c337cdfa593654018c171f6a74c28272265b5.tar.zst
cuberite-496c337cdfa593654018c171f6a74c28272265b5.zip
Diffstat (limited to '')
-rw-r--r--src/LineBlockTracer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/LineBlockTracer.cpp b/src/LineBlockTracer.cpp
index 471d9e13b..e194ae653 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 Item() for the specified chunk
+ // The actual trace is handled with ChunkMapCS locked by calling our ChunkCallback 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);
+ return m_World->DoWithChunk(ChunkX, ChunkZ, [this](cChunk & a_Chunk) { return ChunkCallback(&a_Chunk); });
}
@@ -308,7 +308,7 @@ bool cLineBlockTracer::MoveToNextBlock(void)
-bool cLineBlockTracer::Item(cChunk * a_Chunk)
+bool cLineBlockTracer::ChunkCallback(cChunk * a_Chunk)
{
ASSERT((m_CurrentY >= 0) && (m_CurrentY < cChunkDef::Height)); // This should be provided by FixStartAboveWorld() / FixStartBelowWorld()