mirror of
https://github.com/luanti-org/luanti.git
synced 2026-01-14 13:25:21 +01:00
Clarify that punch toolcaps are not optional (#16720)
This commit is contained in:
@@ -1046,7 +1046,7 @@ void Server::handleCommand_Interact(NetworkPacket *pkt)
|
||||
|
||||
ItemStack selected_item, hand_item;
|
||||
ItemStack tool_item = playersao->getWieldedItem(&selected_item, &hand_item);
|
||||
ToolCapabilities toolcap =
|
||||
const ToolCapabilities &toolcap =
|
||||
tool_item.getToolCapabilities(m_itemdef, &hand_item);
|
||||
v3f dir = (pointed_object->getBasePosition() -
|
||||
(playersao->getBasePosition() + playersao->getEyeOffset())
|
||||
@@ -1054,7 +1054,7 @@ void Server::handleCommand_Interact(NetworkPacket *pkt)
|
||||
float time_from_last_punch =
|
||||
playersao->resetTimeFromLastPunch();
|
||||
|
||||
u32 wear = pointed_object->punch(dir, &toolcap, playersao,
|
||||
u32 wear = pointed_object->punch(dir, toolcap, playersao,
|
||||
time_from_last_punch, tool_item.wear);
|
||||
|
||||
// Callback may have changed item, so get it again
|
||||
|
||||
Reference in New Issue
Block a user