summaryrefslogtreecommitdiffstats
path: root/src/ChunkSender.h
diff options
context:
space:
mode:
authorarchshift <admin@archshift.com>2014-07-29 22:04:00 +0200
committerarchshift <admin@archshift.com>2014-07-29 22:04:00 +0200
commita9b597087b56b4526a3f6447789ba141568575a1 (patch)
treea08542d77b5668a25ca5e00492577ed6f4d61a9a /src/ChunkSender.h
parentSpacing fixes and a few more BLOCK_META constants. (diff)
parentSlight cleanup after portals (diff)
downloadcuberite-a9b597087b56b4526a3f6447789ba141568575a1.tar
cuberite-a9b597087b56b4526a3f6447789ba141568575a1.tar.gz
cuberite-a9b597087b56b4526a3f6447789ba141568575a1.tar.bz2
cuberite-a9b597087b56b4526a3f6447789ba141568575a1.tar.lz
cuberite-a9b597087b56b4526a3f6447789ba141568575a1.tar.xz
cuberite-a9b597087b56b4526a3f6447789ba141568575a1.tar.zst
cuberite-a9b597087b56b4526a3f6447789ba141568575a1.zip
Diffstat (limited to 'src/ChunkSender.h')
-rw-r--r--src/ChunkSender.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/ChunkSender.h b/src/ChunkSender.h
index a26f764a7..624a3a0bd 100644
--- a/src/ChunkSender.h
+++ b/src/ChunkSender.h
@@ -6,17 +6,17 @@
/*
The whole thing is a thread that runs in a loop, waiting for either:
"finished chunks" (ChunkReady()), or
- "chunks to send" (QueueSendChunkTo() )
-to come to a queue.
+ "chunks to send" (QueueSendChunkTo())
+to come to a queue.
And once they do, it requests the chunk data and sends it all away, either
broadcasting (ChunkReady), or
sends to a specific client (QueueSendChunkTo)
Chunk data is queried using the cChunkDataCallback interface.
It is cached inside the ChunkSender object during the query and then processed after the query ends.
-Note that the data needs to be compressed only *after* the query finishes,
+Note that the data needs to be compressed only *after* the query finishes,
because the query callbacks run with ChunkMap's CS locked.
-A client may remove itself from all direct requests(QueueSendChunkTo()) by calling RemoveClient();
+A client may remove itself from all direct requests(QueueSendChunkTo()) by calling RemoveClient();
this ensures that the client's Send() won't be called anymore by ChunkSender.
Note that it may be called by world's BroadcastToChunk() if the client is still in the chunk.
*/
@@ -27,6 +27,7 @@ Note that it may be called by world's BroadcastToChunk() if the client is still
#include "OSSupport/IsThread.h"
#include "ChunkDef.h"
+#include "ChunkDataCallback.h"
@@ -109,7 +110,7 @@ protected:
bool operator ==(const sSendChunk & a_Other)
{
return (
- (a_Other.m_ChunkX == m_ChunkX) &&
+ (a_Other.m_ChunkX == m_ChunkX) &&
(a_Other.m_ChunkY == m_ChunkY) &&
(a_Other.m_ChunkZ == m_ChunkZ) &&
(a_Other.m_Client == m_Client)