diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-12-06 20:59:14 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-12-06 20:59:14 +0100 |
commit | 44d5fd1e879dbdafc72097edfb1ad35367503e95 (patch) | |
tree | 0a0c34ce68ff64b8ddea759b3c559466c6aee934 /src/Entities/Player.cpp | |
parent | Cleaned up torch code and added comments (diff) | |
download | cuberite-44d5fd1e879dbdafc72097edfb1ad35367503e95.tar cuberite-44d5fd1e879dbdafc72097edfb1ad35367503e95.tar.gz cuberite-44d5fd1e879dbdafc72097edfb1ad35367503e95.tar.bz2 cuberite-44d5fd1e879dbdafc72097edfb1ad35367503e95.tar.lz cuberite-44d5fd1e879dbdafc72097edfb1ad35367503e95.tar.xz cuberite-44d5fd1e879dbdafc72097edfb1ad35367503e95.tar.zst cuberite-44d5fd1e879dbdafc72097edfb1ad35367503e95.zip |
Diffstat (limited to 'src/Entities/Player.cpp')
-rw-r--r-- | src/Entities/Player.cpp | 5 |
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)); + } } |