mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
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).
This commit is contained in:
parent
b89c79e905
commit
e988df0fbd
5 changed files with 76 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue