QcChunkStreaming Class
Sends each client the chunks around it (nearest first, loading missing ones in the background through QcChunkLoading, which also unloads the chunks no one needs any more). More...
| Header: | #include <server/chunks/QcChunkStreaming.h> |
Public Functions
| void | stream(QcServerClient &client) |
| bool | viewComplete(const QcServerClient &client) const |
Static Public Members
| QcChunkPos | chunkOf(const QcVec3 &position) |
Detailed Description
Member Function Documentation
[static] QcChunkPos QcChunkStreaming::chunkOf(const QcVec3 &position)
Returns the chunk that holds position.
void QcChunkStreaming::stream(QcServerClient &client)
One tick for client: unloads the chunks it got that are now beyond its view (plus one chunk), sends the loaded chunks of its view it has not got yet, nearest first and a few per tick, and asks for the missing ones.
bool QcChunkStreaming::viewComplete(const QcServerClient &client) const
Returns whether client has every chunk of its view (a pause waits for it, decision E-877).