mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
fixed block unloading from memory (a better fix coming next)
This commit is contained in:
parent
d702a2c33b
commit
3fccc67eb7
8 changed files with 70 additions and 74 deletions
15
src/map.h
15
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue