mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-18 02:45:21 +02:00
Fixes around ServerActiveObject on_punch handling
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user