diff options
author | madmaxoft <github@xoft.cz> | 2014-02-13 17:04:25 +0100 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-02-13 17:04:25 +0100 |
commit | 9bb48a8fa4368d9cc5d9050a6a67f38891afc14e (patch) | |
tree | fcf8e28d0843c8a61990a146ff9643702a5ecc24 /src/World.h | |
parent | MCADefrag: Implemented recompression. (diff) | |
parent | Fixed formatting issue in APIDesc.lua (diff) | |
download | cuberite-9bb48a8fa4368d9cc5d9050a6a67f38891afc14e.tar cuberite-9bb48a8fa4368d9cc5d9050a6a67f38891afc14e.tar.gz cuberite-9bb48a8fa4368d9cc5d9050a6a67f38891afc14e.tar.bz2 cuberite-9bb48a8fa4368d9cc5d9050a6a67f38891afc14e.tar.lz cuberite-9bb48a8fa4368d9cc5d9050a6a67f38891afc14e.tar.xz cuberite-9bb48a8fa4368d9cc5d9050a6a67f38891afc14e.tar.zst cuberite-9bb48a8fa4368d9cc5d9050a6a67f38891afc14e.zip |
Diffstat (limited to '')
-rw-r--r-- | src/World.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/World.h b/src/World.h index fa83fe73e..de4fa6ea6 100644 --- a/src/World.h +++ b/src/World.h @@ -99,6 +99,15 @@ public: } ; + class cTaskUnloadUnusedChunks : + public cTask + { + protected: + // cTask overrides: + virtual void Run(cWorld & a_World) override; + }; + + static const char * GetClassStatic(void) // Needed for ManualBindings's ForEach templates { return "cWorld"; @@ -243,7 +252,8 @@ public: bool IsChunkValid (int a_ChunkX, int a_ChunkZ) const; bool HasChunkAnyClients(int a_ChunkX, int a_ChunkZ) const; - void UnloadUnusedChunks(void); // tolua_export + /** Queues a task to unload unused chunks onto the tick thread. The prefferred way of unloading*/ + void QueueUnloadUnusedChunks(void); // tolua_export void CollectPickupsByPlayer(cPlayer * a_Player); @@ -866,6 +876,9 @@ private: /** Ticks all clients that are in this world */ void TickClients(float a_Dt); + /** Unloads all chunks immediately.*/ + void UnloadUnusedChunks(void); + void UpdateSkyDarkness(void); /** <summary>Generates a random spawnpoint on solid land by walking chunks and finding their biomes</summary> */ |