summaryrefslogtreecommitdiffstats
path: root/source/cChunk.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-25 19:52:08 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-25 19:52:08 +0200
commitbb25ba4977198728b6ee30b61fcc6f48d1d94d4d (patch)
treecd56d34bafc04ba7b2f7d2e0e5634eda540c246e /source/cChunk.h
parentRemoved packet includes where they're not needed (diff)
downloadcuberite-bb25ba4977198728b6ee30b61fcc6f48d1d94d4d.tar
cuberite-bb25ba4977198728b6ee30b61fcc6f48d1d94d4d.tar.gz
cuberite-bb25ba4977198728b6ee30b61fcc6f48d1d94d4d.tar.bz2
cuberite-bb25ba4977198728b6ee30b61fcc6f48d1d94d4d.tar.lz
cuberite-bb25ba4977198728b6ee30b61fcc6f48d1d94d4d.tar.xz
cuberite-bb25ba4977198728b6ee30b61fcc6f48d1d94d4d.tar.zst
cuberite-bb25ba4977198728b6ee30b61fcc6f48d1d94d4d.zip
Diffstat (limited to '')
-rw-r--r--source/cChunk.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/source/cChunk.h b/source/cChunk.h
index 707ea5840..1b08f4d6b 100644
--- a/source/cChunk.h
+++ b/source/cChunk.h
@@ -138,7 +138,7 @@ public:
int GetHeight( int a_X, int a_Z );
- void SendBlockTo( int a_X, int a_Y, int a_Z, cClientHandle* a_Client );
+ void SendBlockTo(int a_RelX, int a_RelY, int a_RelZ, cClientHandle * a_Client);
/// Adds a client to the chunk; returns true if added, false if already there
bool AddClient (cClientHandle* a_Client );
@@ -193,9 +193,13 @@ public:
void SendBlockEntity (int a_BlockX, int a_BlockY, int a_BlockZ, cClientHandle & a_Client);
- void PositionToWorldPosition(int a_ChunkX, int a_ChunkY, int a_ChunkZ, int & a_X, int & a_Y, int & a_Z);
- Vector3i PositionToWorldPosition( const Vector3i & a_InChunkPos ) { return PositionToWorldPosition( a_InChunkPos.x, a_InChunkPos.y, a_InChunkPos.z ); }
- Vector3i PositionToWorldPosition( int a_ChunkX, int a_ChunkY, int a_ChunkZ );
+ Vector3i PositionToWorldPosition(const Vector3i & a_RelPos)
+ {
+ return PositionToWorldPosition(a_RelPos.x, a_RelPos.y, a_RelPos.z);
+ }
+
+ void PositionToWorldPosition(int a_RelX, int a_RelY, int a_RelZ, int & a_BlockX, int & a_BlockY, int & a_BlockZ);
+ Vector3i PositionToWorldPosition(int a_RelX, int a_RelY, int a_RelZ );
inline void MarkDirty(void)
{
@@ -268,6 +272,9 @@ private:
// Makes a copy of the list
cClientHandleList GetAllClients(void) const {return m_LoadedByClient; }
+ /// Sends m_PendingSendBlocks to all clients
+ void BroadcastPendingBlockChanges(void);
+
/// Checks the block scheduled for checking in m_ToTickBlocks[]
void CheckBlocks(void);