diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2020-12-18 21:44:51 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2020-12-21 14:52:15 +0100 |
commit | 491238f79967c397d75f3d1aaa87cd0c21390606 (patch) | |
tree | afa441906048ced29b2a17f19a950eca11384e94 /src/ChunkMap.cpp | |
parent | Improve Silverfish search (diff) | |
download | cuberite-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.cpp | 5 |
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); } |