From 3869f76cc23c6ed1df1ad4f6de9c2561f95e08f0 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sun, 8 Feb 2015 21:21:48 +0000 Subject: Handle client 'leave bed' request * Fixes #1728 --- src/World.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/World.h') diff --git a/src/World.h b/src/World.h index 3cac71a36..8b33cea58 100644 --- a/src/World.h +++ b/src/World.h @@ -45,6 +45,7 @@ class cEntity; class cBlockEntity; class cWorldGenerator; // The generator that actually generates the chunks for a single world class cChunkGenerator; // The thread responsible for generating chunks +class cChunkInterface; class cBeaconEntity; class cChestEntity; class cDispenserEntity; @@ -140,6 +141,21 @@ public: std::vector m_SendQueue; }; + class cTaskTryAwakeSleepingPlayers : + public cTask + { + public: + cTaskTryAwakeSleepingPlayers(const Vector3i & a_Position, cChunkInterface & a_ChunkInterface); + + protected: + // cTask overrides: + virtual void Run(cWorld & a_World) override; + + private: + Vector3i m_Position; + cChunkInterface & m_ChunkInterface; + }; + static const char * GetClassStatic(void) // Needed for ManualBindings's ForEach templates { @@ -695,7 +711,7 @@ public: /** Queues a task onto the tick thread, with the specified delay. The task object will be deleted once the task is finished */ - void ScheduleTask(int a_DelayTicks, cTask * a_Task); + virtual void ScheduleTask(int a_DelayTicks, cTask * a_Task) override; /** Returns the number of chunks loaded */ int GetNumChunks() const; // tolua_export -- cgit v1.2.3