diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-04-13 23:02:10 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-04-13 23:02:10 +0200 |
commit | a49c004278b0e300521e9cedf44a46ac843a958b (patch) | |
tree | cc268ccbd5b938be93923d9aced847572364e263 /source/ChunkSender.cpp | |
parent | Fixed a bit of coding style and function names in cItem (diff) | |
download | cuberite-a49c004278b0e300521e9cedf44a46ac843a958b.tar cuberite-a49c004278b0e300521e9cedf44a46ac843a958b.tar.gz cuberite-a49c004278b0e300521e9cedf44a46ac843a958b.tar.bz2 cuberite-a49c004278b0e300521e9cedf44a46ac843a958b.tar.lz cuberite-a49c004278b0e300521e9cedf44a46ac843a958b.tar.xz cuberite-a49c004278b0e300521e9cedf44a46ac843a958b.tar.zst cuberite-a49c004278b0e300521e9cedf44a46ac843a958b.zip |
Diffstat (limited to 'source/ChunkSender.cpp')
-rw-r--r-- | source/ChunkSender.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/ChunkSender.cpp b/source/ChunkSender.cpp index b49561371..6282a605c 100644 --- a/source/ChunkSender.cpp +++ b/source/ChunkSender.cpp @@ -22,7 +22,7 @@ void cNotifyChunkSender::Call(int a_ChunkX, int a_ChunkZ) { - m_ChunkSender->ChunkReady(a_ChunkX, ZERO_CHUNK_Y, a_ChunkZ); + m_ChunkSender->ChunkReady(a_ChunkX, a_ChunkZ); } @@ -76,12 +76,12 @@ void cChunkSender::Stop(void) -void cChunkSender::ChunkReady(int a_ChunkX, int a_ChunkY, int a_ChunkZ) +void cChunkSender::ChunkReady(int a_ChunkX, int a_ChunkZ) { // This is probably never gonna be called twice for the same chunk, and if it is, we don't mind, so we don't check { cCSLock Lock(m_CS); - m_ChunksReady.push_back(cChunkCoords(a_ChunkX, a_ChunkY, a_ChunkZ)); + m_ChunksReady.push_back(cChunkCoords(a_ChunkX, ZERO_CHUNK_Y, a_ChunkZ)); } m_evtQueue.Set(); } @@ -90,17 +90,17 @@ void cChunkSender::ChunkReady(int a_ChunkX, int a_ChunkY, int a_ChunkZ) -void cChunkSender::QueueSendChunkTo(int a_ChunkX, int a_ChunkY, int a_ChunkZ, cClientHandle * a_Client) +void cChunkSender::QueueSendChunkTo(int a_ChunkX, int a_ChunkZ, cClientHandle * a_Client) { ASSERT(a_Client != NULL); { cCSLock Lock(m_CS); - if (std::find(m_SendChunks.begin(), m_SendChunks.end(), sSendChunk(a_ChunkX, a_ChunkY, a_ChunkZ, a_Client)) != m_SendChunks.end()) + if (std::find(m_SendChunks.begin(), m_SendChunks.end(), sSendChunk(a_ChunkX, ZERO_CHUNK_Y, a_ChunkZ, a_Client)) != m_SendChunks.end()) { // Already queued, bail out return; } - m_SendChunks.push_back(sSendChunk(a_ChunkX, a_ChunkY, a_ChunkZ, a_Client)); + m_SendChunks.push_back(sSendChunk(a_ChunkX, ZERO_CHUNK_Y, a_ChunkZ, a_Client)); } m_evtQueue.Set(); } @@ -200,13 +200,13 @@ void cChunkSender::SendChunk(int a_ChunkX, int a_ChunkY, int a_ChunkZ, cClientHa } // If the chunk has no clients, no need to packetize it: - if (!m_World->HasChunkAnyClients(a_ChunkX, a_ChunkY, a_ChunkZ)) + if (!m_World->HasChunkAnyClients(a_ChunkX, a_ChunkZ)) { return; } // If the chunk is not valid, do nothing - whoever needs it has queued it for loading / generating - if (!m_World->IsChunkValid(a_ChunkX, a_ChunkY, a_ChunkZ)) + if (!m_World->IsChunkValid(a_ChunkX, a_ChunkZ)) { return; } @@ -219,7 +219,7 @@ void cChunkSender::SendChunk(int a_ChunkX, int a_ChunkY, int a_ChunkZ, cClientHa } // Query and prepare chunk data: - if( !m_World->GetChunkData(a_ChunkX, a_ChunkY, a_ChunkZ, *this) ) + if (!m_World->GetChunkData(a_ChunkX, a_ChunkZ, *this)) { return; } |