aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewerobject.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:04 -0500
committerJacek Antonelli2008-08-15 23:45:04 -0500
commit117e22047c5752352342d64e3fb7ce00a4eb8113 (patch)
treee32de2cfba0dda8705ae528fcd1fbe23ba075685 /linden/indra/newview/llviewerobject.cpp
parentSecond Life viewer sources 1.18.0.6 (diff)
downloadmeta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.zip
meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.gz
meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.bz2
meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.xz
Second Life viewer sources 1.18.1.2
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llviewerobject.cpp23
1 files changed, 16 insertions, 7 deletions
diff --git a/linden/indra/newview/llviewerobject.cpp b/linden/indra/newview/llviewerobject.cpp
index d237614..f8095b8 100644
--- a/linden/indra/newview/llviewerobject.cpp
+++ b/linden/indra/newview/llviewerobject.cpp
@@ -176,6 +176,7 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe
176 mLatestRecvPacketID(0), 176 mLatestRecvPacketID(0),
177 mData(NULL), 177 mData(NULL),
178 mAudioSourcep(NULL), 178 mAudioSourcep(NULL),
179 mAudioGain(1.f),
179 mAppAngle(0.f), 180 mAppAngle(0.f),
180 mPixelArea(1024.f), 181 mPixelArea(1024.f),
181 mInventory(NULL), 182 mInventory(NULL),
@@ -2717,6 +2718,12 @@ void LLViewerObject::setPixelAreaAndAngle(LLAgent &agent)
2717 2718
2718BOOL LLViewerObject::updateLOD() 2719BOOL LLViewerObject::updateLOD()
2719{ 2720{
2721 // Update volume of looping sounds
2722 if (mAudioSourcep && mAudioSourcep->isLoop())
2723 {
2724 F32 volume = mAudioGain * gSavedSettings.getF32("AudioLevelSFX");
2725 mAudioSourcep->setGain(volume);
2726 }
2720 return FALSE; 2727 return FALSE;
2721} 2728}
2722 2729
@@ -4057,7 +4064,7 @@ void LLViewerObject::unpackParticleSource(const S32 block_num, const LLUUID& own
4057 { 4064 {
4058 LLPointer<LLViewerPartSourceScript> pss = LLViewerPartSourceScript::unpackPSS(this, NULL, block_num); 4065 LLPointer<LLViewerPartSourceScript> pss = LLViewerPartSourceScript::unpackPSS(this, NULL, block_num);
4059 //If the owner is muted, don't create the system 4066 //If the owner is muted, don't create the system
4060 if(gMuteListp->isMuted(owner_id)) return; 4067 if(gMuteListp->isMuted(owner_id, LLMute::flagParticles)) return;
4061 4068
4062 // We need to be able to deal with a particle source that hasn't changed, but still got an update! 4069 // We need to be able to deal with a particle source that hasn't changed, but still got an update!
4063 if (pss) 4070 if (pss)
@@ -4106,7 +4113,7 @@ void LLViewerObject::unpackParticleSource(LLDataPacker &dp, const LLUUID& owner_
4106 { 4113 {
4107 LLPointer<LLViewerPartSourceScript> pss = LLViewerPartSourceScript::unpackPSS(this, NULL, dp); 4114 LLPointer<LLViewerPartSourceScript> pss = LLViewerPartSourceScript::unpackPSS(this, NULL, dp);
4108 //If the owner is muted, don't create the system 4115 //If the owner is muted, don't create the system
4109 if(gMuteListp->isMuted(owner_id)) return; 4116 if(gMuteListp->isMuted(owner_id, LLMute::flagParticles)) return;
4110 // We need to be able to deal with a particle source that hasn't changed, but still got an update! 4117 // We need to be able to deal with a particle source that hasn't changed, but still got an update!
4111 if (pss) 4118 if (pss)
4112 { 4119 {
@@ -4224,7 +4231,9 @@ void LLViewerObject::setAttachedSound(const LLUUID &audio_uuid, const LLUUID& ow
4224 if (mAudioSourcep) 4231 if (mAudioSourcep)
4225 { 4232 {
4226 BOOL queue = flags & LL_SOUND_FLAG_QUEUE; 4233 BOOL queue = flags & LL_SOUND_FLAG_QUEUE;
4227 mAudioSourcep->setGain(gain); 4234 mAudioGain = gain;
4235 F32 volume = gain * gSavedSettings.getF32("AudioLevelSFX");
4236 mAudioSourcep->setGain(volume);
4228 mAudioSourcep->setLoop(flags & LL_SOUND_FLAG_LOOP); 4237 mAudioSourcep->setLoop(flags & LL_SOUND_FLAG_LOOP);
4229 mAudioSourcep->setSyncMaster(flags & LL_SOUND_FLAG_SYNC_MASTER); 4238 mAudioSourcep->setSyncMaster(flags & LL_SOUND_FLAG_SYNC_MASTER);
4230 mAudioSourcep->setSyncSlave(flags & LL_SOUND_FLAG_SYNC_SLAVE); 4239 mAudioSourcep->setSyncSlave(flags & LL_SOUND_FLAG_SYNC_SLAVE);
@@ -4259,12 +4268,12 @@ void LLViewerObject::adjustAudioGain(const F32 gain)
4259 { 4268 {
4260 return; 4269 return;
4261 } 4270 }
4262 4271 if (mAudioSourcep)
4263 if (!mAudioSourcep)
4264 { 4272 {
4265 return; 4273 mAudioGain = gain;
4274 F32 volume = mAudioGain * gSavedSettings.getF32("AudioLevelSFX");
4275 mAudioSourcep->setGain(volume);
4266 } 4276 }
4267 mAudioSourcep->setGain(gain);
4268} 4277}
4269 4278
4270//---------------------------------------------------------------------------- 4279//----------------------------------------------------------------------------