summaryrefslogtreecommitdiffstats
path: root/source/cWorld.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-16 14:42:35 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-16 14:42:35 +0100
commit423f49d175d8db6283232bd8bdc106e26bdcff4d (patch)
tree5c5cc58d1061c91d2cb39021853ce72ab59839ae /source/cWorld.cpp
parentChunks are properly saved before being unloaded now (diff)
downloadcuberite-423f49d175d8db6283232bd8bdc106e26bdcff4d.tar
cuberite-423f49d175d8db6283232bd8bdc106e26bdcff4d.tar.gz
cuberite-423f49d175d8db6283232bd8bdc106e26bdcff4d.tar.bz2
cuberite-423f49d175d8db6283232bd8bdc106e26bdcff4d.tar.lz
cuberite-423f49d175d8db6283232bd8bdc106e26bdcff4d.tar.xz
cuberite-423f49d175d8db6283232bd8bdc106e26bdcff4d.tar.zst
cuberite-423f49d175d8db6283232bd8bdc106e26bdcff4d.zip
Diffstat (limited to '')
-rw-r--r--source/cWorld.cpp73
1 files changed, 72 insertions, 1 deletions
diff --git a/source/cWorld.cpp b/source/cWorld.cpp
index b97fcaea2..8e95b5bd5 100644
--- a/source/cWorld.cpp
+++ b/source/cWorld.cpp
@@ -398,7 +398,6 @@ void cWorld::InitializeSpawn()
void cWorld::Tick(float a_Dt)
{
- int randWeather = 0;
m_Time += a_Dt / 1000.f;
CurrentTick++;
@@ -938,6 +937,78 @@ void cWorld::Broadcast( const cPacket & a_Packet, cClientHandle* a_Exclude)
+void cWorld::BroadcastToChunkOfBlock(int a_X, int a_Y, int a_Z, cPacket * a_Packet, cClientHandle * a_Exclude)
+{
+ m_ChunkMap->BroadcastToChunkOfBlock(a_X, a_Y, a_Z, a_Packet, a_Exclude);
+}
+
+
+
+
+
+void cWorld::MarkChunkDirty (int a_ChunkX, int a_ChunkY, int a_ChunkZ)
+{
+ m_ChunkMap->MarkChunkDirty (a_ChunkX, a_ChunkY, a_ChunkZ);
+}
+
+
+
+
+
+void cWorld::MarkChunkSaving(int a_ChunkX, int a_ChunkY, int a_ChunkZ)
+{
+ m_ChunkMap->MarkChunkSaving(a_ChunkX, a_ChunkY, a_ChunkZ);
+}
+
+
+
+
+
+void cWorld::MarkChunkSaved (int a_ChunkX, int a_ChunkY, int a_ChunkZ)
+{
+ m_ChunkMap->MarkChunkSaved (a_ChunkX, a_ChunkY, 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);
+}
+
+
+
+
+
+void cWorld::SetChunkData(int a_ChunkX, int a_ChunkY, int a_ChunkZ, const char * a_BlockData, cEntityList & a_Entities, cBlockEntityList & a_BlockEntities)
+{
+ m_ChunkMap->SetChunkData(a_ChunkX, a_ChunkY, a_ChunkZ, a_BlockData, a_Entities, a_BlockEntities);
+}
+
+
+
+
+
+void cWorld::GetChunkData(int a_ChunkX, int a_ChunkY, int a_ChunkZ, cChunkDataCallback * a_Callback)
+{
+ m_ChunkMap->GetChunkData(a_ChunkX, a_ChunkY, a_ChunkZ, a_Callback);
+}
+
+
+
+
+
+bool cWorld::IsChunkValid(int a_ChunkX, int a_ChunkY, int a_ChunkZ) const
+{
+ return m_ChunkMap->IsChunkValid(a_ChunkX, a_ChunkY, a_ChunkZ);
+}
+
+
+
+
+
void cWorld::SetMaxPlayers(int iMax)
{
m_MaxPlayers = MAX_PLAYERS;