summaryrefslogtreecommitdiff
path: root/indra/newview/llagent.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2016-01-15 16:55:04 -0500
committerOz Linden <oz@lindenlab.com>2016-01-15 16:55:04 -0500
commitbc22e587439a2822e5228508e7a4a1e2ec0121c5 (patch)
tree442540d0c2760617a2c0cf0cb9ba1973ab6fb298 /indra/newview/llagent.cpp
parent317644f5d575ecd4e734c9a5327f2a062ebf914a (diff)
parent5a5c023e291990a463b1a91846ce82c70da8daab (diff)
merge changes for 4.0.1-release
Diffstat (limited to 'indra/newview/llagent.cpp')
-rw-r--r--indra/newview/llagent.cpp21
1 files changed, 18 insertions, 3 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 297bd9a05b..3f32be1d68 100644
--- 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;
}