summaryrefslogtreecommitdiff
path: root/indra/newview/llagent.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2016-01-15 16:42:39 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2016-01-15 16:42:39 -0500
commit3612d7d14b1e481402bb3d7cbfb552cd19a3fc0a (patch)
treef3dabe49f7953e24de207a6a0939da5539d5acca /indra/newview/llagent.cpp
parenta6c8de97bbb2609d24e212672b192650aed91e1e (diff)
parent5a5c023e291990a463b1a91846ce82c70da8daab (diff)
merge
Diffstat (limited to 'indra/newview/llagent.cpp')
-rwxr-xr-xindra/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 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;
}