diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2015-02-08 22:21:48 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2015-02-08 22:21:48 +0100 |
commit | 3869f76cc23c6ed1df1ad4f6de9c2561f95e08f0 (patch) | |
tree | 263dd59173d388fa8e7c83d51c928004a230737a /src/World.h | |
parent | Protocol 1.7: Fixed Coverity issues. (diff) | |
download | cuberite-3869f76cc23c6ed1df1ad4f6de9c2561f95e08f0.tar cuberite-3869f76cc23c6ed1df1ad4f6de9c2561f95e08f0.tar.gz cuberite-3869f76cc23c6ed1df1ad4f6de9c2561f95e08f0.tar.bz2 cuberite-3869f76cc23c6ed1df1ad4f6de9c2561f95e08f0.tar.lz cuberite-3869f76cc23c6ed1df1ad4f6de9c2561f95e08f0.tar.xz cuberite-3869f76cc23c6ed1df1ad4f6de9c2561f95e08f0.tar.zst cuberite-3869f76cc23c6ed1df1ad4f6de9c2561f95e08f0.zip |
Diffstat (limited to 'src/World.h')
-rw-r--r-- | src/World.h | 18 |
1 files changed, 17 insertions, 1 deletions
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<Vector3i> 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 |