diff options
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/serverpackethandler.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/network/serverpackethandler.cpp b/src/network/serverpackethandler.cpp index a4fa502ae..a5aaf1ecb 100644 --- a/src/network/serverpackethandler.cpp +++ b/src/network/serverpackethandler.cpp @@ -1653,6 +1653,23 @@ void Server::handleCommand_Interact(NetworkPacket* pkt) } } // action == 4 + + /* + 5: rightclick air + */ + else if (action == 5) { + ItemStack item = playersao->getWieldedItem(); + + actionstream << player->getName() << " activates " + << item.name << std::endl; + + if (m_script->item_OnSecondaryUse( + item, playersao)) { + if( playersao->setWieldedItem(item)) { + SendInventory(playersao); + } + } + } /* |