diff options
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); } |