mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Keep track of player item
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user