summaryrefslogtreecommitdiff
path: root/src/map.h
diff options
context:
space:
mode:
authorKahrl <kahrl@gmx.net>2013-06-02 15:35:29 +0200
committerKahrl <kahrl@gmx.net>2013-06-03 20:09:32 +0200
commite988df0fbdd9d568889a28640c189ae022e99f8e (patch)
treefcbef3860ce8a2f88729490021fcffa20471e3df /src/map.h
parentb89c79e905fb6d8187c066652657c70ccb18b07d (diff)
downloadminetest-e988df0fbdd9d568889a28640c189ae022e99f8e.tar.gz
minetest-e988df0fbdd9d568889a28640c189ae022e99f8e.tar.bz2
minetest-e988df0fbdd9d568889a28640c189ae022e99f8e.zip
Add and implement setting max_clearobjects_extra_loaded_blocks.
Now Environment::clearAllObjects() unloads unused blocks in an interval defined by max_clearobjects_extra_loaded_blocks (default 4096).
Diffstat (limited to 'src/map.h')
-rw-r--r--src/map.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/map.h b/src/map.h
index 31001e4c3..530d81e7a 100644
--- a/src/map.h
+++ b/src/map.h
@@ -279,6 +279,12 @@ public:
void timerUpdate(float dtime, float unload_timeout,
std::list<v3s16> *unloaded_blocks=NULL);
+ /*
+ Unloads all blocks with a zero refCount().
+ Saves modified blocks before unloading on MAPTYPE_SERVER.
+ */
+ void unloadUnreferencedBlocks(std::list<v3s16> *unloaded_blocks=NULL);
+
// Deletes sectors and their blocks from memory
// Takes cache into account
// If deleted sector is in sector cache, clears cache
@@ -433,8 +439,8 @@ public:
void endSave();
void save(ModifiedState save_level);
- //void loadAll();
void listAllLoadableBlocks(std::list<v3s16> &dst);
+ void listAllLoadedBlocks(std::list<v3s16> &dst);
// Saves map seed and possibly other stuff
void saveMapMeta();
void loadMapMeta();