1
0
Fork 0
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:
TeTpaAka 2015-06-25 13:06:49 +02:00 committed by paramat
parent e4ee6548af
commit 785a9a6c1a
6 changed files with 64 additions and 4 deletions

View file

@ -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