summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/World.h2
-rw-r--r--src/WorldStorage/WorldStorage.cpp11
2 files changed, 10 insertions, 3 deletions
diff --git a/src/World.h b/src/World.h
index 67f1275c0..f90ddd90f 100644
--- a/src/World.h
+++ b/src/World.h
@@ -146,7 +146,7 @@ public:
// Broadcast respective packets to all clients of the chunk where the event is taking place
// (Please keep these alpha-sorted)
void BroadcastAttachEntity (const cEntity & a_Entity, const cEntity * a_Vehicle);
- void BroadcastBlockAction (int a_BlockX, int a_BlockY, int a_BlockZ, char a_Byte1, char a_Byte2, BLOCKTYPE a_BlockType, const cClientHandle * a_Exclude = NULL);
+ void BroadcastBlockAction (int a_BlockX, int a_BlockY, int a_BlockZ, char a_Byte1, char a_Byte2, BLOCKTYPE a_BlockType, const cClientHandle * a_Exclude = NULL); // tolua_export
void BroadcastBlockBreakAnimation(int a_EntityID, int a_BlockX, int a_BlockY, int a_BlockZ, char a_Stage, const cClientHandle * a_Exclude = NULL);
void BroadcastBlockEntity (int a_BlockX, int a_BlockY, int a_BlockZ, const cClientHandle * a_Exclude = NULL); ///< If there is a block entity at the specified coods, sends it to all clients except a_Exclude
void BroadcastChat (const AString & a_Message, const cClientHandle * a_Exclude = NULL); // tolua_export
diff --git a/src/WorldStorage/WorldStorage.cpp b/src/WorldStorage/WorldStorage.cpp
index 5f4c112d5..6aec525a8 100644
--- a/src/WorldStorage/WorldStorage.cpp
+++ b/src/WorldStorage/WorldStorage.cpp
@@ -117,6 +117,10 @@ void cWorldStorage::WaitForLoadQueueEmpty(void)
m_LoadQueue.BlockTillEmpty();
}
+
+
+
+
void cWorldStorage::WaitForSaveQueueEmpty(void)
{
m_SaveQueue.BlockTillEmpty();
@@ -124,6 +128,8 @@ void cWorldStorage::WaitForSaveQueueEmpty(void)
+
+
size_t cWorldStorage::GetLoadQueueLength(void)
{
return m_LoadQueue.Size();
@@ -144,8 +150,8 @@ size_t cWorldStorage::GetSaveQueueLength(void)
void cWorldStorage::QueueLoadChunk(int a_ChunkX, int a_ChunkY, int a_ChunkZ, bool a_Generate)
{
- m_Event.Set();
m_LoadQueue.EnqueueItemIfNotPresent(sChunkLoad(a_ChunkX, a_ChunkY, a_ChunkZ, a_Generate));
+ m_Event.Set();
}
@@ -154,8 +160,8 @@ void cWorldStorage::QueueLoadChunk(int a_ChunkX, int a_ChunkY, int a_ChunkZ, boo
void cWorldStorage::QueueSaveChunk(int a_ChunkX, int a_ChunkY, int a_ChunkZ)
{
- m_Event.Set();
m_SaveQueue.EnqueueItemIfNotPresent(cChunkCoords(a_ChunkX, a_ChunkY, a_ChunkZ));
+ m_Event.Set();
}
@@ -166,6 +172,7 @@ void cWorldStorage::QueueSavedMessage(void)
{
// Pushes a special coord pair into the queue, signalizing a message instead
m_SaveQueue.EnqueueItem(cChunkCoords(0, CHUNK_Y_MESSAGE, 0));
+ m_Event.Set();
}