summaryrefslogtreecommitdiffstats
path: root/src/World.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-09-03 21:47:00 +0200
committerMattes D <github@xoft.cz>2014-09-03 21:47:00 +0200
commitc140ba2367bd36bbf56dfd0fdbdb2dbb0d3daa66 (patch)
tree7999d8162d8b390b7bc94831a52f36c8f9743b1f /src/World.cpp
parentAnvil: switched inflate to stream mode. (diff)
parentcommit (diff)
downloadcuberite-c140ba2367bd36bbf56dfd0fdbdb2dbb0d3daa66.tar
cuberite-c140ba2367bd36bbf56dfd0fdbdb2dbb0d3daa66.tar.gz
cuberite-c140ba2367bd36bbf56dfd0fdbdb2dbb0d3daa66.tar.bz2
cuberite-c140ba2367bd36bbf56dfd0fdbdb2dbb0d3daa66.tar.lz
cuberite-c140ba2367bd36bbf56dfd0fdbdb2dbb0d3daa66.tar.xz
cuberite-c140ba2367bd36bbf56dfd0fdbdb2dbb0d3daa66.tar.zst
cuberite-c140ba2367bd36bbf56dfd0fdbdb2dbb0d3daa66.zip
Diffstat (limited to 'src/World.cpp')
-rw-r--r--src/World.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/World.cpp b/src/World.cpp
index 99e09c658..dd6017f0d 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);
}
}
@@ -2769,18 +2769,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);
}
@@ -2796,9 +2796,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);
}
@@ -2903,8 +2903,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);
}
@@ -2913,7 +2912,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);
}