1
0

Separated chunk generator from world / plugin interfaces.

The generator now only takes care of servicing synchronous "GetChunk(X, Y)" and "GetBiomes(X, Y)" requests.
This commit is contained in:
Mattes D
2019-09-01 09:30:00 +02:00
parent f021e2fe22
commit a2ffa432b3
27 changed files with 783 additions and 689 deletions

View File

@@ -19,7 +19,7 @@ void cStructGenTrees::GenFinish(cChunkDesc & a_ChunkDesc)
int ChunkX = a_ChunkDesc.GetChunkX();
int ChunkZ = a_ChunkDesc.GetChunkZ();
cChunkDesc WorkerDesc(ChunkX, ChunkZ);
cChunkDesc WorkerDesc({ChunkX, ChunkZ});
// Generate trees:
for (int x = 0; x <= 2; x++)
@@ -34,7 +34,7 @@ void cStructGenTrees::GenFinish(cChunkDesc & a_ChunkDesc)
if ((x != 1) || (z != 1))
{
Dest = &WorkerDesc;
WorkerDesc.SetChunkCoords(BaseX, BaseZ);
WorkerDesc.SetChunkCoords({BaseX, BaseZ});
// TODO: This may cause a lot of wasted calculations, instead of pulling data out of a single (cChunkDesc) cache