mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Wieldhand: Allow overriding the hand
This commit is contained in:
parent
e4ee6548af
commit
785a9a6c1a
6 changed files with 64 additions and 4 deletions
|
@ -1529,10 +1529,7 @@ void Server::handleCommand_Interact(NetworkPacket* pkt)
|
|||
m_script->on_cheat(playersao, "finished_unknown_dig");
|
||||
}
|
||||
// Get player's wielded item
|
||||
ItemStack playeritem;
|
||||
InventoryList *mlist = playersao->getInventory()->getList("main");
|
||||
if (mlist != NULL)
|
||||
playeritem = mlist->getItem(playersao->getWieldIndex());
|
||||
ItemStack playeritem = playersao->getWieldedItem();
|
||||
ToolCapabilities playeritem_toolcap =
|
||||
playeritem.getToolCapabilities(m_itemdef);
|
||||
// Get diggability and expected digging time
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue