diff options
author | Don Kjer <don@lindenlab.com> | 2007-09-14 21:13:20 +0000 |
---|---|---|
committer | Don Kjer <don@lindenlab.com> | 2007-09-14 21:13:20 +0000 |
commit | 13c391f1984bb8cb9d67a7729af2ee5714409215 (patch) | |
tree | 112edff1d25adabb4893e6746ba76a4182865f8a /indra/newview/llaudiosourcevo.cpp | |
parent | b3d807d5ff8dca6c891e9a5e0ddc7bc147d69f8c (diff) |
EFFECTIVE MERGE: svn merge -r 68118:68999 svn+ssh://svn/svn/linden/branches/maintenance
ACTUAL MERGE: svn merge -r 69685:69687 svn+ssh://svn/svn/linden/branches/release-r69649-maintenance-sync
EQUIVALENT TO: svn merge -r 68118:69663 svn+ssh://svn/svn/linden/branches/maintenance-r68999
Diffstat (limited to 'indra/newview/llaudiosourcevo.cpp')
-rw-r--r-- | indra/newview/llaudiosourcevo.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/indra/newview/llaudiosourcevo.cpp b/indra/newview/llaudiosourcevo.cpp index 9d83e5d80e..21407bf31a 100644 --- a/indra/newview/llaudiosourcevo.cpp +++ b/indra/newview/llaudiosourcevo.cpp @@ -50,7 +50,23 @@ void LLAudioSourceVO::updateGain() BOOL mute = FALSE; if (gParcelMgr) { - LLVector3d pos_global = mObjectp->getPositionGlobal(); + LLVector3d pos_global; + + if (mObjectp->isAttachment()) + { + LLViewerObject* parent = mObjectp; + while (parent + && !parent->isAvatar()) + { + parent = (LLViewerObject*)parent->getParent(); + } + if (parent) + pos_global = parent->getPositionGlobal(); + } + + else + pos_global = mObjectp->getPositionGlobal(); + if (!gParcelMgr->canHearSound(pos_global)) { mute = TRUE; |