mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Improved server commands and added player permissions.
--HG-- extra : rebase_source : 178fe08f10b7de3ebaba088bd24faad795114216
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user