mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Revert "Remove deprecated code segments (#5891)"
This reverts commit 599e13e95e
.
This commit is contained in:
parent
fee5171298
commit
8bdde45895
10 changed files with 417 additions and 33 deletions
|
@ -27,6 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "gamedef.h"
|
||||
#include "log.h"
|
||||
#include "nameidmapping.h"
|
||||
#include "content_mapnode.h" // For legacy name-id mapping
|
||||
#include "content_nodemeta.h" // For legacy deserialization
|
||||
#include "serialization.h"
|
||||
#ifndef SERVER
|
||||
|
@ -930,7 +931,12 @@ void MapBlock::deSerialize_pre22(std::istream &is, u8 version, bool disk)
|
|||
// Dynamically re-set ids based on node names
|
||||
NameIdMapping nimap;
|
||||
// If supported, read node definition id mapping
|
||||
nimap.deSerialize(is);
|
||||
if (version >= 21) {
|
||||
nimap.deSerialize(is);
|
||||
// Else set the legacy mapping
|
||||
} else {
|
||||
content_mapnode_get_name_id_mapping(&nimap);
|
||||
}
|
||||
correctBlockNodeIds(&nimap, data, m_gamedef);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue