diff options
author | andreykproductengine <akleshchev@productengine.com> | 2015-09-10 16:16:50 +0300 |
---|---|---|
committer | andreykproductengine <akleshchev@productengine.com> | 2015-09-10 16:16:50 +0300 |
commit | 7048679ac8c6cea9238c1602d75ead4d983cdbc0 (patch) | |
tree | d58ad2db31e7a62a465f0451006744d5051d6d33 /indra | |
parent | bcd10a94da57c7c399a72eb6dbdf172603f6467b (diff) |
MAINT-5584 FIXED On voice disabled parcel or region, speak button remains disabled in ad-hoc and group voice calls - you can hear but not speak.
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/newview/llagent.cpp | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 297bd9a05b..3f32be1d68 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -275,9 +275,24 @@ bool LLAgent::isActionAllowed(const LLSD& sdname) if (param == "speak") { - if ( gAgent.isVoiceConnected() && - LLViewerParcelMgr::getInstance()->allowAgentVoice() && - ! LLVoiceClient::getInstance()->inTuningMode() ) + bool allow_agent_voice = false; + LLVoiceChannel* channel = LLVoiceChannel::getCurrentVoiceChannel(); + if (channel != NULL) + { + if (channel->getSessionName().empty() && channel->getSessionID().isNull()) + { + // default channel + allow_agent_voice = LLViewerParcelMgr::getInstance()->allowAgentVoice(); + } + else + { + allow_agent_voice = channel->isActive() && channel->callStarted(); + } + } + + if (gAgent.isVoiceConnected() && + allow_agent_voice && + !LLVoiceClient::getInstance()->inTuningMode()) { retval = true; } |