aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorMcCabe Maxsted2009-02-14 05:21:14 -0700
committerMcCabe Maxsted2009-02-14 05:21:14 -0700
commit7f858539851bac96f2a20e50f7e94010a015808c (patch)
tree6672cfc655b3a194a4114c9a911945980db95cc5 /linden/indra/newview/llvoavatar.cpp
parentFixed crash in LLTextEditor::findHTML (diff)
downloadmeta-impy-7f858539851bac96f2a20e50f7e94010a015808c.zip
meta-impy-7f858539851bac96f2a20e50f7e94010a015808c.tar.gz
meta-impy-7f858539851bac96f2a20e50f7e94010a015808c.tar.bz2
meta-impy-7f858539851bac96f2a20e50f7e94010a015808c.tar.xz
Fixed sound settings not being correctly muted
Diffstat (limited to 'linden/indra/newview/llvoavatar.cpp')
-rw-r--r--linden/indra/newview/llvoavatar.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp
index d41f72e..fd2487b 100644
--- a/linden/indra/newview/llvoavatar.cpp
+++ b/linden/indra/newview/llvoavatar.cpp
@@ -3797,7 +3797,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
3797 const LLUUID AGENT_FOOTSTEP_ANIMS[] = {ANIM_AGENT_WALK, ANIM_AGENT_RUN, ANIM_AGENT_LAND}; 3797 const LLUUID AGENT_FOOTSTEP_ANIMS[] = {ANIM_AGENT_WALK, ANIM_AGENT_RUN, ANIM_AGENT_LAND};
3798 const S32 NUM_AGENT_FOOTSTEP_ANIMS = sizeof(AGENT_FOOTSTEP_ANIMS) / sizeof(LLUUID); 3798 const S32 NUM_AGENT_FOOTSTEP_ANIMS = sizeof(AGENT_FOOTSTEP_ANIMS) / sizeof(LLUUID);
3799 3799
3800 if ( gAudiop && isAnyAnimationSignaled(AGENT_FOOTSTEP_ANIMS, NUM_AGENT_FOOTSTEP_ANIMS) ) 3800 if ( gAudiop && !gSavedSettings.getBOOL("MuteAmbient") && isAnyAnimationSignaled(AGENT_FOOTSTEP_ANIMS, NUM_AGENT_FOOTSTEP_ANIMS) )
3801 { 3801 {
3802 BOOL playSound = FALSE; 3802 BOOL playSound = FALSE;
3803 LLVector3 foot_pos_agent; 3803 LLVector3 foot_pos_agent;
@@ -3828,7 +3828,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
3828// AUDIO_STEP_LO_SPEED, AUDIO_STEP_HI_SPEED, 3828// AUDIO_STEP_LO_SPEED, AUDIO_STEP_HI_SPEED,
3829// AUDIO_STEP_LO_GAIN, AUDIO_STEP_HI_GAIN ); 3829// AUDIO_STEP_LO_GAIN, AUDIO_STEP_HI_GAIN );
3830 3830
3831 const F32 STEP_VOLUME = 0.5f; 3831 const F32 STEP_VOLUME = 0.2f;
3832 LLUUID& step_sound_id = getStepSound(); 3832 LLUUID& step_sound_id = getStepSound();
3833 3833
3834 LLVector3d foot_pos_global = gAgent.getPosGlobalFromAgent(foot_pos_agent); 3834 LLVector3d foot_pos_global = gAgent.getPosGlobalFromAgent(foot_pos_agent);
@@ -4800,7 +4800,7 @@ BOOL LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, BOOL
4800 { 4800 {
4801 if (anim_id == ANIM_AGENT_TYPE) 4801 if (anim_id == ANIM_AGENT_TYPE)
4802 { 4802 {
4803 if (gAudiop) 4803 if (gAudiop && !gSavedSettings.getBOOL("MuteAmbient"))
4804 { 4804 {
4805 LLVector3d char_pos_global = gAgent.getPosGlobalFromAgent(getCharacterPosition()); 4805 LLVector3d char_pos_global = gAgent.getPosGlobalFromAgent(getCharacterPosition());
4806 if (LLViewerParcelMgr::getInstance()->canHearSound(char_pos_global) 4806 if (LLViewerParcelMgr::getInstance()->canHearSound(char_pos_global)
@@ -4814,11 +4814,8 @@ BOOL LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, BOOL
4814 // gAudiop->triggerSound(LLUUID(gSavedSettings.getString("UISndTyping")), volume); 4814 // gAudiop->triggerSound(LLUUID(gSavedSettings.getString("UISndTyping")), volume);
4815 //} 4815 //}
4816 //else 4816 //else
4817 { 4817 LLUUID sound_id = LLUUID(gSavedSettings.getString("UISndTyping"));
4818 LLUUID sound_id = LLUUID(gSavedSettings.getString("UISndTyping")); 4818 gAudiop->triggerSound(sound_id, getID(), 1.0f, LLAudioEngine::AUDIO_TYPE_SFX, char_pos_global);
4819 gAudiop->triggerSound(sound_id, getID(), 1.0f, LLAudioEngine::AUDIO_TYPE_SFX, char_pos_global);
4820
4821 }
4822 } 4819 }
4823 } 4820 }
4824 } 4821 }