mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Improved server commands and added player permissions.
--HG-- extra : rebase_source : 178fe08f10b7de3ebaba088bd24faad795114216
This commit is contained in:
parent
dadac0e79f
commit
248d7c8469
8 changed files with 454 additions and 70 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue