no on-punch events with a mese pick, it just digs

This commit is contained in:
darkrose 2015-03-13 21:48:15 +10:00
parent 27bae61c12
commit e8f0e332ad
1 changed files with 4 additions and 0 deletions

View File

@ -2469,6 +2469,10 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
SendPlayerAnim(player,PLAYERANIM_DIG);
MapNode n = m_env.getMap().getNodeNoEx(p_under);
InventoryItem *wield = (InventoryItem*)player->getWieldItem();
// no on-punch events with a mese pick, it will have dug the item
// on the first hit anyway
if (wield && wield->getContent() == CONTENT_TOOLITEM_MESEPICK)
return;
// KEY
if (wield && wield->getContent() == CONTENT_TOOLITEM_KEY) {
NodeMetadata *meta = m_env.getMap().getNodeMetadata(p_under);