From 2e1588820d3c27a82d4bd6401dc9af728130908c Mon Sep 17 00:00:00 2001 From: Tycho Bickerstaff Date: Sun, 22 Dec 2013 14:55:24 +0000 Subject: fixed warnings in World.cpp --- src/World.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/World.h') diff --git a/src/World.h b/src/World.h index c067252d9..67f1275c0 100644 --- a/src/World.h +++ b/src/World.h @@ -78,6 +78,7 @@ public: class cTask { public: + virtual ~cTask(){}; virtual void Run(cWorld & a_World) = 0; } ; -- cgit v1.2.3 From 0d5a5cc990a9674bdf53000285076491fce1356f Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Mon, 6 Jan 2014 16:01:20 +0100 Subject: Exported cWorld::BroadcastBlockAction(). As requested in #508; no guarantees about it. --- src/World.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/World.h') 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 -- cgit v1.2.3 From cea997426b7d66f5aa9f8aac5fd5b603bcaa3fb8 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Fri, 10 Jan 2014 22:22:54 +0100 Subject: Decoupled cChunkGenerator from cWorld and cRoot. Now the chunk generator can be used by other projects without depending on the two hugest structures in MCS. --- src/World.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/World.h') diff --git a/src/World.h b/src/World.h index f90ddd90f..b61708d03 100644 --- a/src/World.h +++ b/src/World.h @@ -636,6 +636,27 @@ private: virtual void Execute(void) override; } ; + + /** Implementation of the callbacks that the ChunkGenerator uses to store new chunks and interface to plugins */ + class cChunkGeneratorCallbacks : + public cChunkGenerator::cChunkSink, + public cChunkGenerator::cPluginInterface + { + cWorld * m_World; + + // cChunkSink overrides: + virtual void OnChunkGenerated (cChunkDesc & a_ChunkDesc) override; + virtual bool IsChunkValid (int a_ChunkX, int a_ChunkZ) override; + virtual bool HasChunkAnyClients(int a_ChunkX, int a_ChunkZ) override; + + // cPluginInterface overrides: + virtual void CallHookChunkGenerating(cChunkDesc & a_ChunkDesc) override; + virtual void CallHookChunkGenerated (cChunkDesc & a_ChunkDesc) override; + + public: + cChunkGeneratorCallbacks(cWorld & a_World); + } ; + AString m_WorldName; AString m_IniFileName; @@ -714,6 +735,9 @@ private: cChunkGenerator m_Generator; + /** The callbacks that the ChunkGenerator uses to store new chunks and interface to plugins */ + cChunkGeneratorCallbacks m_GeneratorCallbacks; + cChunkSender m_ChunkSender; cLightingThread m_Lighting; cTickThread m_TickThread; -- cgit v1.2.3