diff options
author | Mattes D <github@xoft.cz> | 2019-09-01 09:30:00 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2019-09-06 16:12:33 +0200 |
commit | a2ffa432b31096f2533ecb50f49ba450b29a2989 (patch) | |
tree | 5bdd754cad5e7b49e279ee0e21b9fa15c7c35d7b /src/ChunkMap.cpp | |
parent | Updated LibEvent to release 2.1.11-stable. (#4383) (diff) | |
download | cuberite-a2ffa432b31096f2533ecb50f49ba450b29a2989.tar cuberite-a2ffa432b31096f2533ecb50f49ba450b29a2989.tar.gz cuberite-a2ffa432b31096f2533ecb50f49ba450b29a2989.tar.bz2 cuberite-a2ffa432b31096f2533ecb50f49ba450b29a2989.tar.lz cuberite-a2ffa432b31096f2533ecb50f49ba450b29a2989.tar.xz cuberite-a2ffa432b31096f2533ecb50f49ba450b29a2989.tar.zst cuberite-a2ffa432b31096f2533ecb50f49ba450b29a2989.zip |
Diffstat (limited to 'src/ChunkMap.cpp')
-rw-r--r-- | src/ChunkMap.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp index dd8f1add1..b5a6252ff 100644 --- a/src/ChunkMap.cpp +++ b/src/ChunkMap.cpp @@ -1798,7 +1798,7 @@ void cChunkMap::PrepareChunk(int a_ChunkX, int a_ChunkZ, std::unique_ptr<cChunkC // The chunk is present and lit, just call the callback, report as success: if (a_Callback != nullptr) { - a_Callback->Call(a_ChunkX, a_ChunkZ, true); + a_Callback->Call({a_ChunkX, a_ChunkZ}, true); } } @@ -1831,34 +1831,34 @@ bool cChunkMap::GenerateChunk(int a_ChunkX, int a_ChunkZ, cChunkCoordCallback * } // cChunkCoordCallback override: - virtual void Call(int a_CBChunkX, int a_CBChunkZ, bool a_CBIsSuccess) override + virtual void Call(cChunkCoords a_Coords, bool a_CBIsSuccess) override { // If success is reported, the chunk is already valid, no need to do anything else: if (a_CBIsSuccess) { if (m_Callback != nullptr) { - m_Callback->Call(a_CBChunkX, a_CBChunkZ, true); + m_Callback->Call(a_Coords, true); } return; } // The chunk failed to load, generate it: cCSLock CBLock(m_ChunkMap.m_CSChunks); - cChunkPtr CBChunk = m_ChunkMap.GetChunkNoLoad(a_CBChunkX, a_CBChunkZ); + cChunkPtr CBChunk = m_ChunkMap.GetChunkNoLoad(a_Coords.m_ChunkX, a_Coords.m_ChunkZ); if (CBChunk == nullptr) { // An error occurred, but we promised to call the callback, so call it even when there's no real chunk data: if (m_Callback != nullptr) { - m_Callback->Call(a_CBChunkX, a_CBChunkZ, false); + m_Callback->Call(a_Coords, false); } return; } CBChunk->SetPresence(cChunk::cpQueued); - m_World.GetGenerator().QueueGenerateChunk(a_CBChunkX, a_CBChunkZ, false, m_Callback); + m_World.GetGenerator().QueueGenerateChunk(a_Coords, false, m_Callback); } protected: @@ -1873,7 +1873,7 @@ bool cChunkMap::GenerateChunk(int a_ChunkX, int a_ChunkZ, cChunkCoordCallback * // The chunk is valid, just call the callback: if (a_Callback != nullptr) { - a_Callback->Call(a_ChunkX, a_ChunkZ, true); + a_Callback->Call({a_ChunkX, a_ChunkZ}, true); } return true; } |