mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Keep track of player item
This commit is contained in:
parent
467b3cf4c1
commit
91d1186cbb
5 changed files with 28 additions and 1 deletions
|
@ -33,6 +33,7 @@ Player::Player():
|
|||
craftresult_is_preview(true),
|
||||
hp(20),
|
||||
peer_id(PEER_ID_INEXISTENT),
|
||||
m_selected_item(0),
|
||||
m_pitch(0),
|
||||
m_yaw(0),
|
||||
m_speed(0,0,0),
|
||||
|
@ -47,6 +48,11 @@ Player::~Player()
|
|||
delete inventory_backup;
|
||||
}
|
||||
|
||||
void Player::wieldItem(u16 item)
|
||||
{
|
||||
m_selected_item = item;
|
||||
}
|
||||
|
||||
void Player::resetInventory()
|
||||
{
|
||||
inventory.clear();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue