summaryrefslogtreecommitdiffstats
path: root/source/cChunk.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-23 22:21:37 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-23 22:21:37 +0100
commit062b38b8b04a9f921550fb0a1f4c056216b9437f (patch)
tree26031833d6efe5e98461e5f3e8a893511919edc5 /source/cChunk.h
parentMade cChunkPtr a plain old pointer again, since it's safe now (diff)
downloadcuberite-062b38b8b04a9f921550fb0a1f4c056216b9437f.tar
cuberite-062b38b8b04a9f921550fb0a1f4c056216b9437f.tar.gz
cuberite-062b38b8b04a9f921550fb0a1f4c056216b9437f.tar.bz2
cuberite-062b38b8b04a9f921550fb0a1f4c056216b9437f.tar.lz
cuberite-062b38b8b04a9f921550fb0a1f4c056216b9437f.tar.xz
cuberite-062b38b8b04a9f921550fb0a1f4c056216b9437f.tar.zst
cuberite-062b38b8b04a9f921550fb0a1f4c056216b9437f.zip
Diffstat (limited to '')
-rw-r--r--source/cChunk.h19
1 files changed, 5 insertions, 14 deletions
diff --git a/source/cChunk.h b/source/cChunk.h
index b13cbd920..f0e47834d 100644
--- a/source/cChunk.h
+++ b/source/cChunk.h
@@ -107,6 +107,8 @@ typedef std::list< sSetBlock > sSetBlockList;
+// This class is not to be used directly
+// Instead, call actions on cChunkMap (such as cChunkMap::SetBlock() etc.)
class cChunk
{
public:
@@ -182,13 +184,10 @@ public:
void CalculateLighting(); // Recalculate right now
void CalculateHeightmap();
- bool LoadFromDisk();
-
// Broadcasts to all clients that have loaded this chunk
void Broadcast( const cPacket & a_Packet, cClientHandle * a_Exclude = NULL) {Broadcast(&a_Packet, a_Exclude); }
void Broadcast( const cPacket * a_Packet, cClientHandle * a_Exclude = NULL);
- // TODO: These functions are dangerous - rewrite to:
// Loaded(blockdata, lightdata, blockentities, entities),
// Generated(blockdata, lightdata, blockentities, entities),
// GetBlockData(blockdatadest) etc.
@@ -200,10 +199,6 @@ public:
void CopyBlockDataFrom(const char * a_NewBlockData); // Copies all blockdata, recalculates heightmap (used by chunk loaders)
- // TODO: Move this into the specific WSSchema:
- void LoadFromJson( const Json::Value & a_Value );
- void SaveToJson( Json::Value & a_Value );
-
char GetLight(char* a_Buffer, int a_BlockIdx);
char GetLight(char* a_Buffer, int x, int y, int z);
void SetLight(char* a_Buffer, int a_BlockIdx, char a_Light);
@@ -238,13 +233,9 @@ private:
std::map< unsigned int, int > m_ToTickBlocks;
std::vector< unsigned int > m_PendingSendBlocks;
- // TODO: This CS will soon not be needed, because all chunk access is protected by its parent ChunkMap's csLayers
- cCriticalSection m_CSClients;
- cClientHandleList m_LoadedByClient;
- cClientHandleList m_UnloadQuery;
-
- // TODO: This CS will soon not be needed, because all chunk access is protected by its parent ChunkMap's csLayers
- cCriticalSection m_CSEntities;
+ // A critical section is not needed, because all chunk access is protected by its parent ChunkMap's csLayers
+ cClientHandleList m_LoadedByClient;
+ cClientHandleList m_UnloadQuery;
cEntityList m_Entities;
cBlockEntityList m_BlockEntities;