1
0

Tools make a sound when breaking, fixes #266

This commit is contained in:
Tiger Wang
2013-12-06 19:59:14 +00:00
parent 77a7bfb3e5
commit 44d5fd1e87
2 changed files with 5 additions and 2 deletions

View File

@@ -1575,7 +1575,10 @@ void cPlayer::UseEquippedItem(void)
return;
}
GetInventory().DamageEquippedItem();
if (GetInventory().DamageEquippedItem())
{
m_World->BroadcastSoundEffect("random.break", (int)GetPosX() * 8, (int)GetPosY() * 8, (int)GetPosZ() * 8, 0.5f, (float)(0.75 + ((float)((GetUniqueID() * 23) % 32)) / 64));
}
}