mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Do not serialize empty NodeMetadata
This commit fixes #4516, though note that this will gradually fix MapBlocks as they are used/modified and thus re-serialized.
This commit is contained in:
parent
5091cb5ecd
commit
3a57e52500
2 changed files with 23 additions and 3 deletions
|
@ -47,6 +47,7 @@ public:
|
|||
void deSerialize(std::istream &is);
|
||||
|
||||
void clear();
|
||||
bool empty() const;
|
||||
|
||||
// Generic key/value store
|
||||
std::string getString(const std::string &name, unsigned short recursion = 0) const;
|
||||
|
@ -94,6 +95,8 @@ public:
|
|||
void clear();
|
||||
|
||||
private:
|
||||
int countNonEmpty() const;
|
||||
|
||||
std::map<v3s16, NodeMetadata *> m_data;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue