mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Move MapBlock (de)serializing code out of Database class
This commit is contained in:
parent
3feece1f28
commit
eec456be63
12 changed files with 118 additions and 492 deletions
|
@ -270,7 +270,7 @@ public:
|
|||
|
||||
// Server implements this.
|
||||
// Client leaves it as no-op.
|
||||
virtual bool saveBlock(MapBlock *block){ return false; };
|
||||
virtual bool saveBlock(MapBlock *block) { return false; };
|
||||
|
||||
/*
|
||||
Updates usage timers and unloads unused blocks and sectors.
|
||||
|
@ -485,6 +485,7 @@ public:
|
|||
// Returns true if sector now resides in memory
|
||||
//bool deFlushSector(v2s16 p2d);
|
||||
|
||||
bool saveBlock(MapBlock *block, Database *db);
|
||||
bool saveBlock(MapBlock *block);
|
||||
// This will generate a sector with getSector if not found.
|
||||
void loadBlock(std::string sectordir, std::string blockfile, MapSector *sector, bool save_after_load=false);
|
||||
|
@ -560,4 +561,3 @@ protected:
|
|||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue