summaryrefslogtreecommitdiffstats
path: root/src/ChunkMap.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-12-18 21:44:51 +0100
committerTiger Wang <ziwei.tiger@outlook.com>2020-12-21 14:52:15 +0100
commit491238f79967c397d75f3d1aaa87cd0c21390606 (patch)
treeafa441906048ced29b2a17f19a950eca11384e94 /src/ChunkMap.cpp
parentImprove Silverfish search (diff)
downloadcuberite-491238f79967c397d75f3d1aaa87cd0c21390606.tar
cuberite-491238f79967c397d75f3d1aaa87cd0c21390606.tar.gz
cuberite-491238f79967c397d75f3d1aaa87cd0c21390606.tar.bz2
cuberite-491238f79967c397d75f3d1aaa87cd0c21390606.tar.lz
cuberite-491238f79967c397d75f3d1aaa87cd0c21390606.tar.xz
cuberite-491238f79967c397d75f3d1aaa87cd0c21390606.tar.zst
cuberite-491238f79967c397d75f3d1aaa87cd0c21390606.zip
Diffstat (limited to 'src/ChunkMap.cpp')
-rw-r--r--src/ChunkMap.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp
index 46fafd480..aaa8cc0b1 100644
--- a/src/ChunkMap.cpp
+++ b/src/ChunkMap.cpp
@@ -153,9 +153,8 @@ bool cChunkMap::DoWithChunk(int a_ChunkX, int a_ChunkZ, cChunkCallback a_Callbac
bool cChunkMap::DoWithChunkAt(Vector3i a_BlockPos, cChunkCallback a_Callback)
{
- int ChunkX, ChunkZ;
- cChunkDef::BlockToChunk(a_BlockPos.x, a_BlockPos.z, ChunkX, ChunkZ);
- return DoWithChunk(ChunkX, ChunkZ, a_Callback);
+ const auto Position = cChunkDef::BlockToChunk(a_BlockPos);
+ return DoWithChunk(Position.m_ChunkX, Position.m_ChunkZ, a_Callback);
}