diff options
Diffstat (limited to 'indra/newview/llvoiceclient.cpp')
-rw-r--r-- | indra/newview/llvoiceclient.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 5ba13efca2..cc346c2345 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -60,6 +60,7 @@ #include "llappviewer.h" // for gDisconnected, gDisableVoice #include "llmutelist.h" // to check for muted avatars #include "llagent.h" +#include "llvoavatarself.h" #include "llcachename.h" #include "llimview.h" // for LLIMMgr #include "llparcel.h" @@ -4598,7 +4599,15 @@ void LLVoiceClient::participantUpdatedEvent( { participant->mPower = 0.0f; } - participant->mVolume = volume; + + // *HACK: Minimal hack to fix EXT-6508, ignore the incoming volume if it is zero. + // This happens because we send volume zero to Vivox when someone is muted, + // Vivox then send it back to us, overwriting the previous volume. + // Remove this hack once volume refactoring from EXT-6031 is applied. + if (volume != 0) + { + participant->mVolume = volume; + } // *HACK: mantipov: added while working on EXT-3544 @@ -5866,9 +5875,9 @@ void LLVoiceClient::updatePosition(void) if(gVoiceClient) { - LLVOAvatar *agent = gAgent.getAvatarObject(); + LLVOAvatarSelf *avatarp = gAgent.getAvatarObject(); LLViewerRegion *region = gAgent.getRegion(); - if(region && agent) + if(region && avatarp) { LLMatrix3 rot; LLVector3d pos; @@ -5886,9 +5895,9 @@ void LLVoiceClient::updatePosition(void) rot); // rotation matrix // Send the current avatar position to the voice code - rot = agent->getRootJoint()->getWorldRotation().getMatrix3(); + rot = avatarp->getRootJoint()->getWorldRotation().getMatrix3(); - pos = agent->getPositionGlobal(); + pos = avatarp->getPositionGlobal(); // TODO: Can we get the head offset from outside the LLVOAvatar? // pos += LLVector3d(mHeadOffset); pos += LLVector3d(0.f, 0.f, 1.f); |