diff options
author | Glenn Glazer <coyot@lindenlab.com> | 2016-03-08 13:32:28 -0800 |
---|---|---|
committer | Glenn Glazer <coyot@lindenlab.com> | 2016-03-08 13:32:28 -0800 |
commit | ec683bb9cf6688633d8bc7ecbdf72f7cbc14d349 (patch) | |
tree | 59ada405958cd7764a96cfa35ccc89e83706b5af /indra/newview/llagent.cpp | |
parent | daf8b882a12cf903d180f6303065d7b83f7a1958 (diff) | |
parent | 5a5c023e291990a463b1a91846ce82c70da8daab (diff) |
pull from trunk
Diffstat (limited to 'indra/newview/llagent.cpp')
-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; } |