summaryrefslogtreecommitdiffstats
path: root/source/cWorld.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-05 17:41:57 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-05 17:41:57 +0100
commit4d65ffffc0b6f35ac84e310fd4bc9739ea7e0c0a (patch)
treeccc5f55d8f7a15f08bab8f0222fd1b2f95e5d7a2 /source/cWorld.cpp
parentRemoved redstone debugging: powered dirt blocks change into stone (diff)
downloadcuberite-4d65ffffc0b6f35ac84e310fd4bc9739ea7e0c0a.tar
cuberite-4d65ffffc0b6f35ac84e310fd4bc9739ea7e0c0a.tar.gz
cuberite-4d65ffffc0b6f35ac84e310fd4bc9739ea7e0c0a.tar.bz2
cuberite-4d65ffffc0b6f35ac84e310fd4bc9739ea7e0c0a.tar.lz
cuberite-4d65ffffc0b6f35ac84e310fd4bc9739ea7e0c0a.tar.xz
cuberite-4d65ffffc0b6f35ac84e310fd4bc9739ea7e0c0a.tar.zst
cuberite-4d65ffffc0b6f35ac84e310fd4bc9739ea7e0c0a.zip
Diffstat (limited to 'source/cWorld.cpp')
-rw-r--r--source/cWorld.cpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/source/cWorld.cpp b/source/cWorld.cpp
index 2b0f4ab2b..daf34d8f1 100644
--- a/source/cWorld.cpp
+++ b/source/cWorld.cpp
@@ -238,6 +238,8 @@ cWorld::cWorld( const AString & a_WorldName )
}
m_ChunkMap = new cChunkMap(this );
+
+ m_ChunkSender.Start(this);
m_Time = 0;
m_WorldTimeFraction = 0.f;
@@ -975,6 +977,7 @@ void cWorld::MarkChunkSaved (int a_ChunkX, int a_ChunkY, int a_ChunkZ)
void cWorld::ChunkDataLoaded(int a_ChunkX, int a_ChunkY, int a_ChunkZ, const char * a_BlockData, cEntityList & a_Entities, cBlockEntityList & a_BlockEntities)
{
m_ChunkMap->ChunkDataLoaded(a_ChunkX, a_ChunkY, a_ChunkZ, a_BlockData, a_Entities, a_BlockEntities);
+ m_ChunkSender.ChunkReady(a_ChunkX, a_ChunkY, a_ChunkZ);
}
@@ -984,6 +987,7 @@ void cWorld::ChunkDataLoaded(int a_ChunkX, int a_ChunkY, int a_ChunkZ, const cha
void cWorld::ChunkDataGenerated(int a_ChunkX, int a_ChunkY, int a_ChunkZ, const char * a_BlockData, cEntityList & a_Entities, cBlockEntityList & a_BlockEntities)
{
m_ChunkMap->ChunkDataGenerated(a_ChunkX, a_ChunkY, a_ChunkZ, a_BlockData, a_Entities, a_BlockEntities);
+ m_ChunkSender.ChunkReady(a_ChunkX, a_ChunkY, a_ChunkZ);
}
@@ -1008,6 +1012,15 @@ bool cWorld::GetChunkBlocks(int a_ChunkX, int a_ChunkY, int a_ChunkZ, char * a_B
+bool cWorld::GetChunkBlockData(int a_ChunkX, int a_ChunkY, int a_ChunkZ, char * a_BlockData)
+{
+ return m_ChunkMap->GetChunkBlockData(a_ChunkX, a_ChunkY, a_ChunkZ, a_BlockData);
+}
+
+
+
+
+
bool cWorld::IsChunkValid(int a_ChunkX, int a_ChunkY, int a_ChunkZ) const
{
return m_ChunkMap->IsChunkValid(a_ChunkX, a_ChunkY, a_ChunkZ);
@@ -1279,15 +1292,6 @@ void cWorld::RemoveClientFromChunks(cClientHandle * a_Client, const cChunkCoords
-bool cWorld::SendChunkTo(int a_ChunkX, int a_ChunkY, int a_ChunkZ, cClientHandle * a_Client)
-{
- return m_ChunkMap->SendChunkTo(a_ChunkX, a_ChunkY, a_ChunkZ, a_Client);
-}
-
-
-
-
-
void cWorld::TouchChunk(int a_ChunkX, int a_ChunkY, int a_ChunkZ)
{
m_ChunkMap->TouchChunk(a_ChunkX, a_ChunkY, a_ChunkZ);