diff options
author | sfan5 <sfan5@live.de> | 2020-03-04 19:13:26 +0100 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2020-03-05 22:04:23 +0100 |
commit | e774d8ca2fa5ead9f6d739a2031e6655a22a5b4d (patch) | |
tree | 6aba5db64df6c5773bdca50cc22a66e4832909a4 /src/network | |
parent | 8d6a0b917ce1e7f4f1017835af0ca76e79c98c38 (diff) | |
download | minetest-e774d8ca2fa5ead9f6d739a2031e6655a22a5b4d.tar.gz minetest-e774d8ca2fa5ead9f6d739a2031e6655a22a5b4d.tar.bz2 minetest-e774d8ca2fa5ead9f6d739a2031e6655a22a5b4d.zip |
Fixes around ServerActiveObject on_punch handling
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/serverpackethandler.cpp | 2 |
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); |