aboutsummaryrefslogtreecommitdiff
path: root/src/map.h
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-06-26 21:53:11 +0300
committerPerttu Ahola <celeron55@gmail.com>2011-06-26 21:53:11 +0300
commit3fccc67eb7c530c280e9b496e22288ffa772152d (patch)
tree3272f5ec9b197dda47751401679747fe2785a8dd /src/map.h
parentd702a2c33b975a4763f6831a0ba5d8fce110c8f9 (diff)
downloadminetest-3fccc67eb7c530c280e9b496e22288ffa772152d.tar.gz
minetest-3fccc67eb7c530c280e9b496e22288ffa772152d.tar.bz2
minetest-3fccc67eb7c530c280e9b496e22288ffa772152d.zip
fixed block unloading from memory (a better fix coming next)
Diffstat (limited to 'src/map.h')
-rw-r--r--src/map.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/map.h b/src/map.h
index c64f8cbdb..2fe749007 100644
--- a/src/map.h
+++ b/src/map.h
@@ -230,13 +230,18 @@ public:
Updates usage timers
*/
void timerUpdate(float dtime);
-
+
+ // Deletes sectors and their blocks from memory
// Takes cache into account
- // sector mutex should be locked when calling
- void deleteSectors(core::list<v2s16> &list, bool only_blocks);
+ // If deleted sector is in sector cache, clears cache
+ void deleteSectors(core::list<v2s16> &list);
- // Returns count of deleted sectors
- u32 unloadUnusedData(float timeout, bool only_blocks=false,
+ /*
+ Unload unused data
+ = flush changed to disk and delete from memory, if usage timer of
+ block is more than timeout
+ */
+ void unloadUnusedData(float timeout,
core::list<v3s16> *deleted_blocks=NULL);
// For debug printing