summaryrefslogtreecommitdiffstats
path: root/src/World.h
diff options
context:
space:
mode:
authornarroo <narroo@vt.edu>2014-02-11 02:00:07 +0100
committernarroo <narroo@vt.edu>2014-02-11 02:00:07 +0100
commite8e76a6058988cb0cff222579049fb6aa3cdb9c1 (patch)
tree4f808fb359e91ab315a95a1d5b9161d092774bc0 /src/World.h
parentTypo Fix in console.lua (diff)
downloadcuberite-e8e76a6058988cb0cff222579049fb6aa3cdb9c1.tar
cuberite-e8e76a6058988cb0cff222579049fb6aa3cdb9c1.tar.gz
cuberite-e8e76a6058988cb0cff222579049fb6aa3cdb9c1.tar.bz2
cuberite-e8e76a6058988cb0cff222579049fb6aa3cdb9c1.tar.lz
cuberite-e8e76a6058988cb0cff222579049fb6aa3cdb9c1.tar.xz
cuberite-e8e76a6058988cb0cff222579049fb6aa3cdb9c1.tar.zst
cuberite-e8e76a6058988cb0cff222579049fb6aa3cdb9c1.zip
Diffstat (limited to '')
-rw-r--r--src/World.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/World.h b/src/World.h
index 0174be03b..e4036d8df 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,12 @@ public:
bool IsChunkValid (int a_ChunkX, int a_ChunkZ) const;
bool HasChunkAnyClients(int a_ChunkX, int a_ChunkZ) const;
- void UnloadUnusedChunks(void); // tolua_export
+
+ /*Unloads all chunks immediately. Dangerous interface, may deadlock, use QueueUnloadUnusedChunks() instead*/
+ void UnloadUnusedChunks(void);
+
+ /*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);