summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2011-08-10 18:31:44 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2011-08-11 15:22:36 +0200
commit91d1186cbb0e651de919e17e6808c75c20a0ef6f (patch)
tree3db6e789a39978a825c1cacc1061869d967dcaa3 /src/client.cpp
parent467b3cf4c10b5078371af0a3b5ae951017f35020 (diff)
downloadminetest-91d1186cbb0e651de919e17e6808c75c20a0ef6f.tar.gz
minetest-91d1186cbb0e651de919e17e6808c75c20a0ef6f.tar.bz2
minetest-91d1186cbb0e651de919e17e6808c75c20a0ef6f.zip
Keep track of player item
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 30bd10198..2687d01e0 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -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()