summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Entities/Player.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index 910613e98..bfacc3422 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -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));
+ }
}