49 void Add(
int a_ChunkX,
int a_ChunkZ);
53 void Remove(
int a_ChunkX,
int a_ChunkZ);
std::vector< cChunkCoords > cChunkCoordsVector
Makes chunks stay loaded until this object is cleared or destroyed Works by setting internal flags in...
virtual void Disable(void)
Disables the ChunkStay, the chunks are released and the ChunkStay object can be edited with Add() and...
void Clear(void)
Clears all the chunks that have been added.
virtual bool OnAllChunksAvailable(void)=0
Called once all of the contained chunks are available.
void Remove(int a_ChunkX, int a_ChunkZ)
Releases the chunk so that it's no longer locked from unloading.
void Add(int a_ChunkX, int a_ChunkZ)
Adds a chunk to be locked from unloading.
void Enable(cChunkMap &a_ChunkMap)
Enables the ChunkStay on the specified chunkmap, causing it to load and generate chunks.
bool ChunkAvailable(int a_ChunkX, int a_ChunkZ)
Called by cChunkMap when a chunk is available, checks m_NumLoaded and triggers the appropriate callba...
cChunkCoordsVector m_Chunks
The list of chunks to lock from unloading.
virtual void OnChunkAvailable(int a_ChunkX, int a_ChunkZ)=0
Called when a specific chunk become available.
virtual void OnDisabled(void)=0
Called by the ChunkMap when the ChunkStay is disabled.
cChunkMap * m_ChunkMap
The chunkmap where the object is enabled.
const cChunkCoordsVector & GetChunks(void) const
Returns all the chunks that should be kept.
virtual ~cChunkStay()
Deletes the object.
cChunkCoordsVector m_OutstandingChunks
The chunks that still need loading.