From 785a9a6c1af424b0a46f334de7176c9e67341cfb Mon Sep 17 00:00:00 2001 From: TeTpaAka Date: Thu, 25 Jun 2015 13:06:49 +0200 Subject: Wieldhand: Allow overriding the hand --- src/network/serverpackethandler.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/network') diff --git a/src/network/serverpackethandler.cpp b/src/network/serverpackethandler.cpp index d56424b75..70eb0a828 100644 --- a/src/network/serverpackethandler.cpp +++ b/src/network/serverpackethandler.cpp @@ -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 -- cgit v1.2.3