aboutsummaryrefslogtreecommitdiff
path: root/src/network/serverpackethandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/serverpackethandler.cpp')
-rw-r--r--src/network/serverpackethandler.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/network/serverpackethandler.cpp b/src/network/serverpackethandler.cpp
index 7a42ce5ef..23bcc867f 100644
--- a/src/network/serverpackethandler.cpp
+++ b/src/network/serverpackethandler.cpp
@@ -1166,6 +1166,8 @@ void Server::handleCommand_Interact(NetworkPacket *pkt)
u16 wear = pointed_object->punch(dir, &toolcap, playersao,
time_from_last_punch);
+ // Callback may have changed item, so get it again
+ playersao->getWieldedItem(&selected_item);
bool changed = selected_item.addWear(wear, m_itemdef);
if (changed)
playersao->setWieldedItem(selected_item);