diff options
author | SmallJoker <mk939@ymail.com> | 2020-11-22 17:49:30 +0100 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2021-01-29 17:32:35 +0100 |
commit | 37a05ec8d6cbf9ff4432225cffe78c16fdd0647d (patch) | |
tree | 727e4272f1f16fe1a6a51484d1bba728c8632615 /src/database/database-files.cpp | |
parent | 5e9dd1667b244df4e7767be404d4a12966d6a90a (diff) | |
download | minetest-37a05ec8d6cbf9ff4432225cffe78c16fdd0647d.tar.gz minetest-37a05ec8d6cbf9ff4432225cffe78c16fdd0647d.tar.bz2 minetest-37a05ec8d6cbf9ff4432225cffe78c16fdd0647d.zip |
Settings: Proper priority hierarchy
Remove old defaults system
Introduce priority-based fallback list
Use new functions for map_meta special functions
Change groups to use end tags
Unittest changes:
* Adapt unittest to the new code
* Compare Settings objects
Diffstat (limited to 'src/database/database-files.cpp')
-rw-r--r-- | src/database/database-files.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/database/database-files.cpp b/src/database/database-files.cpp index 529fb8763..d9e8f24ea 100644 --- a/src/database/database-files.cpp +++ b/src/database/database-files.cpp @@ -122,18 +122,17 @@ void PlayerDatabaseFiles::serialize(RemotePlayer *p, std::ostream &os) args.set("name", p->m_name); // This should not happen - assert(m_sao); - args.setU16("hp", p->m_sao->getHP()); - args.setV3F("position", p->m_sao->getBasePosition()); - args.setFloat("pitch", p->m_sao->getLookPitch()); - args.setFloat("yaw", p->m_sao->getRotation().Y); - args.setU16("breath", p->m_sao->getBreath()); + PlayerSAO *sao = p->getPlayerSAO(); + assert(sao); + args.setU16("hp", sao->getHP()); + args.setV3F("position", sao->getBasePosition()); + args.setFloat("pitch", sao->getLookPitch()); + args.setFloat("yaw", sao->getRotation().Y); + args.setU16("breath", sao->getBreath()); std::string extended_attrs; { // serializeExtraAttributes - PlayerSAO *sao = p->getPlayerSAO(); - assert(sao); Json::Value json_root; const StringMap &attrs = sao->getMeta().getStrings(); |