diff options
author | TeTpaAka <TeTpaAka@users.noreply.github.com> | 2015-06-25 13:06:49 +0200 |
---|---|---|
committer | paramat <mat.gregory@virginmedia.com> | 2016-11-26 03:49:30 +0000 |
commit | 785a9a6c1af424b0a46f334de7176c9e67341cfb (patch) | |
tree | f0b33e1c47e65800beacae8d6c905c8a02307674 /src/network | |
parent | e4ee6548afd01040046ee3780d0fbb121d141251 (diff) | |
download | minetest-785a9a6c1af424b0a46f334de7176c9e67341cfb.tar.gz minetest-785a9a6c1af424b0a46f334de7176c9e67341cfb.tar.bz2 minetest-785a9a6c1af424b0a46f334de7176c9e67341cfb.zip |
Wieldhand: Allow overriding the hand
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/serverpackethandler.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
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 |