aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpoet-nohit <poet.nohit@gmail.com>2015-03-21 13:41:32 -0600
committerLoic Blot <loic.blot@unix-experience.fr>2015-03-21 21:37:32 +0100
commit7679396ebbb38115eedbfb8e9636dff50cdf2075 (patch)
tree59256391ed1a39f9c4ad997b207be7ed31cbc7a1
parent837a2e1e5fef788cf108e036c27d092cedb3982f (diff)
downloadminetest-7679396ebbb38115eedbfb8e9636dff50cdf2075.tar.gz
minetest-7679396ebbb38115eedbfb8e9636dff50cdf2075.tar.bz2
minetest-7679396ebbb38115eedbfb8e9636dff50cdf2075.zip
SendInventory when handleCommand_Interact is a use.
This call was missing when change looping to triggering SendInventory: 1b2f64473ed4f222d3b7f02df853730d4382105e
-rw-r--r--src/network/serverpackethandler.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/network/serverpackethandler.cpp b/src/network/serverpackethandler.cpp
index 97e46c515..f6438d311 100644
--- a/src/network/serverpackethandler.cpp
+++ b/src/network/serverpackethandler.cpp
@@ -1724,7 +1724,9 @@ void Server::handleCommand_Interact(NetworkPacket* pkt)
if (m_script->item_OnUse(
item, playersao, pointed)) {
// Apply returned ItemStack
- playersao->setWieldedItem(item);
+ if (playersao->setWieldedItem(item)) {
+ SendInventory(playersao);
+ }
}
} // action == 4