summaryrefslogtreecommitdiffstats
path: root/src/World.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/World.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/World.cpp b/src/World.cpp
index d3751364f..2a3336dee 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -442,7 +442,7 @@ void cWorld::InitializeSpawn(void)
{
for (int z = 0; z < ViewDist; z++)
{
- m_ChunkMap->TouchChunk(x + ChunkX-(ViewDist - 1) / 2, ZERO_CHUNK_Y, z + ChunkZ-(ViewDist - 1) / 2); // Queue the chunk in the generator / loader
+ m_ChunkMap->TouchChunk(x + ChunkX-(ViewDist - 1) / 2, z + ChunkZ-(ViewDist - 1) / 2); // Queue the chunk in the generator / loader
}
}
@@ -2424,7 +2424,7 @@ void cWorld::SetChunkData(cSetChunkData & a_SetChunkData)
// Save the chunk right after generating, so that we don't have to generate it again on next run
if (a_SetChunkData.ShouldMarkDirty())
{
- m_Storage.QueueSaveChunk(ChunkX, 0, ChunkZ);
+ m_Storage.QueueSaveChunk(ChunkX, ChunkZ);
}
}
@@ -2778,18 +2778,18 @@ void cWorld::RemoveClientFromChunkSender(cClientHandle * a_Client)
-void cWorld::TouchChunk(int a_ChunkX, int a_ChunkY, int a_ChunkZ)
+void cWorld::TouchChunk(int a_ChunkX, int a_ChunkZ)
{
- m_ChunkMap->TouchChunk(a_ChunkX, a_ChunkY, a_ChunkZ);
+ m_ChunkMap->TouchChunk(a_ChunkX, a_ChunkZ);
}
-bool cWorld::LoadChunk(int a_ChunkX, int a_ChunkY, int a_ChunkZ)
+bool cWorld::LoadChunk(int a_ChunkX, int a_ChunkZ)
{
- return m_ChunkMap->LoadChunk(a_ChunkX, a_ChunkY, a_ChunkZ);
+ return m_ChunkMap->LoadChunk(a_ChunkX, a_ChunkZ);
}
@@ -2805,9 +2805,9 @@ void cWorld::LoadChunks(const cChunkCoordsList & a_Chunks)
-void cWorld::ChunkLoadFailed(int a_ChunkX, int a_ChunkY, int a_ChunkZ)
+void cWorld::ChunkLoadFailed(int a_ChunkX, int a_ChunkZ)
{
- m_ChunkMap->ChunkLoadFailed(a_ChunkX, a_ChunkY, a_ChunkZ);
+ m_ChunkMap->ChunkLoadFailed(a_ChunkX, a_ChunkZ);
}
@@ -2912,8 +2912,7 @@ void cWorld::RegenerateChunk(int a_ChunkX, int a_ChunkZ)
{
m_ChunkMap->MarkChunkRegenerating(a_ChunkX, a_ChunkZ);
- // Trick: use Y=1 to force the chunk generation even though the chunk data is already present
- m_Generator.QueueGenerateChunk(a_ChunkX, 1, a_ChunkZ);
+ m_Generator.QueueGenerateChunk(a_ChunkX, a_ChunkZ, true);
}
@@ -2922,7 +2921,7 @@ void cWorld::RegenerateChunk(int a_ChunkX, int a_ChunkZ)
void cWorld::GenerateChunk(int a_ChunkX, int a_ChunkZ)
{
- m_Generator.QueueGenerateChunk(a_ChunkX, ZERO_CHUNK_Y, a_ChunkZ);
+ m_Generator.QueueGenerateChunk(a_ChunkX, a_ChunkZ, false);
}