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

Method AddWantedChunk

src/ClientHandle.cpp:2580–2593  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2578
2579
2580void cClientHandle::AddWantedChunk(int a_ChunkX, int a_ChunkZ)
2581{
2582 if (m_State >= csDestroying)
2583 {
2584 return;
2585 }
2586
2587 LOGD("Adding chunk [%d, %d] to wanted chunks for client %p", a_ChunkX, a_ChunkZ, this);
2588 cCSLock Lock(m_CSChunkLists);
2589 if (std::find(m_ChunksToSend.begin(), m_ChunksToSend.end(), cChunkCoords(a_ChunkX, ZERO_CHUNK_Y, a_ChunkZ)) == m_ChunksToSend.end())
2590 {
2591 m_ChunksToSend.push_back(cChunkCoords(a_ChunkX, ZERO_CHUNK_Y, a_ChunkZ));
2592 }
2593}
2594
2595
2596

Callers 2

ForceSendChunkToMethod · 0.80
MarkRegeneratingMethod · 0.80

Calls 3

cChunkCoordsClass · 0.85
beginMethod · 0.80
endMethod · 0.80

Tested by

no test coverage detected