diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-11-10 21:48:12 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-11-10 21:48:12 +0100 |
commit | 71abbb2f56c15634cca8615343d9699d0c50724d (patch) | |
tree | f56c254125256cc23f481b4ac18c843bd7470566 /source/Entities/Pickup.cpp | |
parent | Removed cStringMap. (diff) | |
download | cuberite-71abbb2f56c15634cca8615343d9699d0c50724d.tar cuberite-71abbb2f56c15634cca8615343d9699d0c50724d.tar.gz cuberite-71abbb2f56c15634cca8615343d9699d0c50724d.tar.bz2 cuberite-71abbb2f56c15634cca8615343d9699d0c50724d.tar.lz cuberite-71abbb2f56c15634cca8615343d9699d0c50724d.tar.xz cuberite-71abbb2f56c15634cca8615343d9699d0c50724d.tar.zst cuberite-71abbb2f56c15634cca8615343d9699d0c50724d.zip |
Diffstat (limited to 'source/Entities/Pickup.cpp')
-rw-r--r-- | source/Entities/Pickup.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/Entities/Pickup.cpp b/source/Entities/Pickup.cpp index bc8abd204..5bd61effc 100644 --- a/source/Entities/Pickup.cpp +++ b/source/Entities/Pickup.cpp @@ -145,6 +145,8 @@ bool cPickup::CollectedBy(cPlayer * a_Dest) { m_Item.m_ItemCount -= NumAdded; m_World->BroadcastCollectPickup(*this, *a_Dest); + // Also send the "pop" sound effect with a somewhat random pitch (fast-random using EntityID ;) + m_World->BroadcastSoundEffect("random.pop",(int)GetPosX() * 8, (int)GetPosY() * 8, (int)GetPosZ() * 8, 0.5, (float)(0.75 + ((float)((GetUniqueID() * 23) % 32)) / 64)); if (m_Item.m_ItemCount == 0) { // All of the pickup has been collected, schedule the pickup for destroying |