summaryrefslogtreecommitdiff
path: root/indra/newview/llaudiosourcevo.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2008-04-01 17:45:04 +0000
committerSteven Bennetts <steve@lindenlab.com>2008-04-01 17:45:04 +0000
commit941cb9f4124c9ccfd5c845bc94639fa46df12c3d (patch)
treee0f525e7bd6cc76d89b2df69c6f1554d191561e8 /indra/newview/llaudiosourcevo.cpp
parentecec626dec93524f7ef5831a5ba344d6449b99bc (diff)
merge release@83343 skinning-1-merge@83714 -> release
QAR-424
Diffstat (limited to 'indra/newview/llaudiosourcevo.cpp')
-rw-r--r--indra/newview/llaudiosourcevo.cpp46
1 files changed, 22 insertions, 24 deletions
diff --git a/indra/newview/llaudiosourcevo.cpp b/indra/newview/llaudiosourcevo.cpp
index fac2e7bff2..b7f4820a59 100644
--- a/indra/newview/llaudiosourcevo.cpp
+++ b/indra/newview/llaudiosourcevo.cpp
@@ -71,51 +71,49 @@ void LLAudioSourceVO::updateGain()
}
BOOL mute = FALSE;
- if (gParcelMgr)
- {
- LLVector3d pos_global;
+ LLVector3d pos_global;
- if (mObjectp->isAttachment())
+ if (mObjectp->isAttachment())
+ {
+ LLViewerObject* parent = mObjectp;
+ while (parent && !parent->isAvatar())
{
- LLViewerObject* parent = mObjectp;
- while (parent
- && !parent->isAvatar())
- {
- parent = (LLViewerObject*)parent->getParent();
- }
- if (parent)
- pos_global = parent->getPositionGlobal();
+ parent = (LLViewerObject*)parent->getParent();
}
-
- else
- pos_global = mObjectp->getPositionGlobal();
-
- if (!gParcelMgr->canHearSound(pos_global))
+ if (parent)
{
- mute = TRUE;
+ pos_global = parent->getPositionGlobal();
}
}
+ else
+ {
+ pos_global = mObjectp->getPositionGlobal();
+ }
+
+ if (!LLViewerParcelMgr::getInstance()->canHearSound(pos_global))
+ {
+ mute = TRUE;
+ }
- if (!mute && gMuteListp)
+ if (!mute)
{
- if (gMuteListp->isMuted(mObjectp->getID()))
+ if (LLMuteList::getInstance()->isMuted(mObjectp->getID()))
{
mute = TRUE;
}
- else if (gMuteListp->isMuted(mOwnerID, LLMute::flagObjectSounds))
+ else if (LLMuteList::getInstance()->isMuted(mOwnerID, LLMute::flagObjectSounds))
{
mute = TRUE;
}
else if (mObjectp->isAttachment())
{
LLViewerObject* parent = mObjectp;
- while (parent
- && !parent->isAvatar())
+ while (parent && !parent->isAvatar())
{
parent = (LLViewerObject*)parent->getParent();
}
if (parent
- && gMuteListp->isMuted(parent->getID()))
+ && LLMuteList::getInstance()->isMuted(parent->getID()))
{
mute = TRUE;
}