10 public std::enable_shared_from_this<cSpawnPrepare>
18 static void PrepareChunks(
cWorld & a_World,
int a_SpawnChunkX,
int a_SpawnChunkZ,
int a_PrepareDistance);
Generates and lights the spawn area of the world.
static void PrepareChunks(cWorld &a_World, int a_SpawnChunkX, int a_SpawnChunkZ, int a_PrepareDistance)
std::chrono::steady_clock::time_point m_LastReportTime
The timestamp of the last progress report emitted.
int m_LastReportChunkCount
Number of chunks prepared when the last progress report was emitted.
void PreparedChunkCallback(int a_ChunkX, int a_ChunkZ)
int m_MaxIdx
The maximum index of the prepared chunks.
std::atomic< int > m_NumPrepared
Total number of chunks already finished preparing.
void DecodeChunkCoords(int a_Idx, int &a_ChunkX, int &a_ChunkZ)
Decodes the index into chunk coords.
cEvent m_EvtFinished
Event used to signal that the preparation is finished.
int m_NextIdx
The index of the next chunk to be queued in the lighting thread.
cSpawnPrepare(cWorld &a_World, int a_SpawnChunkX, int a_SpawnChunkZ, int a_PrepareDistance, int a_FirstIdx, sMakeSharedTag)
Private tag allows public constructors that can only be used with private access.