Updates usage timers and unloads unused blocks and sectors.
Saves modified blocks before unloading on MAPTYPE_SERVER.
*/
- void timerUpdate(float dtime, float unload_timeout,
+ void timerUpdate(float dtime, float unload_timeout, u32 max_loaded_blocks,
std::vector<v3s16> *unloaded_blocks=NULL);
/*
These are basically coordinate wrappers to MapBlock
*/
- NodeMetadata* getNodeMetadata(v3s16 p);
+ std::vector<v3s16> findNodesWithMetadata(v3s16 p1, v3s16 p2);
+ NodeMetadata *getNodeMetadata(v3s16 p);
/**
* Sets metadata for a node.
u32 m_unprocessed_count;
u32 m_inc_trending_up_start_time; // milliseconds
bool m_queue_size_timer_started;
+
+ DISABLE_CLASS_COPY(Map);
};
/*
- Check disk (doesn't load blocks)
- Create blank one
*/
- ServerMapSector * createSector(v2s16 p);
+ ServerMapSector *createSector(v2s16 p);
/*
Blocks are generated by using these and makeBlock().
*/
- bool initBlockMake(BlockMakeData *data, v3s16 blockpos);
+ bool initBlockMake(v3s16 blockpos, BlockMakeData *data);
void finishBlockMake(BlockMakeData *data,
- std::map<v3s16, MapBlock*> &changed_blocks);
+ std::map<v3s16, MapBlock*> *changed_blocks);
/*
Get a block from somewhere.
- Memory
- Create blank
*/
- MapBlock * createBlock(v3s16 p);
+ MapBlock *createBlock(v3s16 p);
/*
Forcefully get a block from somewhere.