From c4446e11d7ed488c127f2864f19a3341f3b151ef Mon Sep 17 00:00:00 2001 From: Beq Date: Mon, 26 Nov 2018 17:14:06 +0000 Subject: [PATCH] INT-141 Limit the maximum gain applied to collision sounds --- indra/newview/llviewermessage.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 763d99b0a3..e572623982 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4715,6 +4715,11 @@ void process_sound_trigger(LLMessageSystem *msg, void **) msg->getU64Fast(_PREHASH_SoundData, _PREHASH_Handle, region_handle); msg->getVector3Fast(_PREHASH_SoundData, _PREHASH_Position, pos_local); msg->getF32Fast(_PREHASH_SoundData, _PREHASH_Gain, gain); + static LLCachedControl maxGain(gSavedSettings, "FSMaxCollisionGain",1.0, "Limit the maximum volume that can be specified for collisions"); + if (gain>maxGain) + { + gain = maxGain; + } // adjust sound location to true global coords LLVector3d pos_global = from_region_handle(region_handle);