diff options
Diffstat (limited to 'src/player.cpp')
-rw-r--r-- | src/player.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/player.cpp b/src/player.cpp index 64780de75..a6ddeee64 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -34,7 +34,8 @@ Player::Player(): m_pitch(0), m_yaw(0), m_speed(0,0,0), - m_position(0,0,0) + m_position(0,0,0), + privs(PRIV_DEFAULT) { updateName("<not set>"); resetInventory(); @@ -100,6 +101,7 @@ void Player::serialize(std::ostream &os) args.setV3F("position", m_position); args.setBool("craftresult_is_preview", craftresult_is_preview); args.setS32("hp", hp); + args.setU64("privs", privs); args.writeLines(os); @@ -141,6 +143,11 @@ void Player::deSerialize(std::istream &is) }catch(SettingNotFoundException &e){ hp = 20; } + try{ + privs = args.getU64("privs"); + }catch(SettingNotFoundException &e){ + privs = PRIV_DEFAULT; + } inventory.deSerialize(is); } |