MCPcopy Create free account
hub / github.com/cuberite/cuberite / QueueSendChunkTo

Method QueueSendChunkTo

src/ChunkSender.cpp:93–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91
92
93void cChunkSender::QueueSendChunkTo(int a_ChunkX, int a_ChunkZ, cClientHandle * a_Client)
94{
95 ASSERT(a_Client != NULL);
96 {
97 cCSLock Lock(m_CS);
98 if (std::find(m_SendChunks.begin(), m_SendChunks.end(), sSendChunk(a_ChunkX, ZERO_CHUNK_Y, a_ChunkZ, a_Client)) != m_SendChunks.end())
99 {
100 // Already queued, bail out
101 return;
102 }
103 m_SendChunks.push_back(sSendChunk(a_ChunkX, ZERO_CHUNK_Y, a_ChunkZ, a_Client));
104 }
105 m_evtQueue.Set();
106}
107
108
109

Callers 2

SendChunkToMethod · 0.80
ForceSendChunkToMethod · 0.80

Calls 4

sSendChunkClass · 0.85
beginMethod · 0.80
endMethod · 0.80
SetMethod · 0.45

Tested by

no test coverage detected