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
|
@ -1953,6 +1953,14 @@ void Client::setPlayerControl(PlayerControl &control)
|
|||
player->control = control;
|
||||
}
|
||||
|
||||
void Client::selectPlayerItem(u16 item)
|
||||
{
|
||||
LocalPlayer *player = m_env.getLocalPlayer();
|
||||
assert(player != NULL);
|
||||
|
||||
player->wieldItem(item);
|
||||
}
|
||||
|
||||
// Returns true if the inventory of the local player has been
|
||||
// updated from the server. If it is true, it is set to false.
|
||||
bool Client::getLocalInventoryUpdated()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue