From 455db074b0bd286031f075f251abe7caa5a2c76e Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 6 Apr 2021 18:24:21 +0300 Subject: SL-14960 Add checkbox to turn off collision sound. --- indra/newview/llviewermessage.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 458fc3b13d..126d146ac6 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -38,6 +38,7 @@ #include "llfollowcamparams.h" #include "llinventorydefines.h" #include "lllslconstants.h" +#include "llmaterialtable.h" #include "llregionhandle.h" #include "llsd.h" #include "llsdserialize.h" @@ -3857,6 +3858,11 @@ void process_sound_trigger(LLMessageSystem *msg, void **) return; } + if (LLMaterialTable::basic.isCollisionSound(sound_id) && !gSavedSettings.getBOOL("EnableCollisionSounds")) + { + return; + } + gAudiop->triggerSound(sound_id, owner_id, gain, LLAudioEngine::AUDIO_TYPE_SFX, pos_global); } -- cgit v1.2.3