1
0
Fork 0
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:
Giuseppe Bilotta 2011-08-10 18:31:44 +02:00
parent 467b3cf4c1
commit 91d1186cbb
5 changed files with 28 additions and 1 deletions

View file

@ -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()