From 4ed182c13aee963bd54bc19830b7a6cd19b48d33 Mon Sep 17 00:00:00 2001 From: Mat Date: Fri, 3 Apr 2020 18:49:12 +0300 Subject: Tweak pickup sound pitch (#4598) --- src/Entities/ArrowEntity.cpp | 2 +- src/Entities/Pickup.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Entities/ArrowEntity.cpp b/src/Entities/ArrowEntity.cpp index 54ece0e16..428721a80 100644 --- a/src/Entities/ArrowEntity.cpp +++ b/src/Entities/ArrowEntity.cpp @@ -154,7 +154,7 @@ void cArrowEntity::CollectedBy(cPlayer & a_Dest) } GetWorld()->BroadcastCollectEntity(*this, a_Dest, 1); - GetWorld()->BroadcastSoundEffect("entity.item.pickup", GetPosition(), 0.5, static_cast(0.75 + (static_cast((GetUniqueID() * 23) % 32)) / 64)); + GetWorld()->BroadcastSoundEffect("entity.item.pickup", GetPosition(), 0.3f, (1.2f + (static_cast((GetUniqueID() * 23) % 32)) / 64)); m_bIsCollected = true; } } diff --git a/src/Entities/Pickup.cpp b/src/Entities/Pickup.cpp index 679e9d5ff..1ab01c631 100644 --- a/src/Entities/Pickup.cpp +++ b/src/Entities/Pickup.cpp @@ -255,7 +255,7 @@ bool cPickup::CollectedBy(cPlayer & a_Dest) m_World->BroadcastCollectEntity(*this, a_Dest, NumAdded); // Also send the "pop" sound effect with a somewhat random pitch (fast-random using EntityID ;) - m_World->BroadcastSoundEffect("entity.item.pickup", GetPosition(), 0.5, (0.75f + (static_cast((GetUniqueID() * 23) % 32)) / 64)); + m_World->BroadcastSoundEffect("entity.item.pickup", GetPosition(), 0.3f, (1.2f + (static_cast((GetUniqueID() * 23) % 32)) / 64)); if (m_Item.m_ItemCount <= 0) { // All of the pickup has been collected, schedule the pickup for destroying -- cgit v1.2.3