diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2011-10-31 16:26:09 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2011-10-31 16:26:09 -0400 |
commit | 09179d1346ccf2fa07b2dec6a72592beb3bd262f (patch) | |
tree | 86b28bc6c0322a9abe9721dd0a0aa6e104487926 /indra/newview/llagent.cpp | |
parent | 0f9dc968cfb702eba595213bbecd34375bd048c5 (diff) | |
parent | f18cfe97750cc13374adab15636532fe0fbda19c (diff) |
merge viewer-development to mesh-development
Diffstat (limited to 'indra/newview/llagent.cpp')
-rwxr-xr-x | indra/newview/llagent.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 773e20eda7..f8b204eca0 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -175,7 +175,9 @@ bool LLAgent::isActionAllowed(const LLSD& sdname) } else if (param == "speak") { - if ( gAgent.isVoiceConnected() ) + if ( gAgent.isVoiceConnected() && + LLViewerParcelMgr::getInstance()->allowAgentVoice() && + ! LLVoiceClient::getInstance()->inTuningMode() ) { retval = true; } @@ -305,13 +307,6 @@ LLAgent::LLAgent() : mListener.reset(new LLAgentListener(*this)); mMoveTimer.stop(); - - LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback(boost::bind(&LLAgent::parcelChangedCallback)); - - LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Agent.IsActionAllowed", boost::bind(&LLAgent::isActionAllowed, _2)); - LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Agent.PressMicrophone", boost::bind(&LLAgent::pressMicrophone, _2)); - LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Agent.ReleaseMicrophone", boost::bind(&LLAgent::releaseMicrophone, _2)); - LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Agent.IsMicrophoneOn", boost::bind(&LLAgent::isMicrophoneOn, _2)); } // Requires gSavedSettings to be initialized. @@ -333,6 +328,14 @@ void LLAgent::init() gSavedSettings.getControl("PreferredMaturity")->getValidateSignal()->connect(boost::bind(&LLAgent::validateMaturity, this, _2)); gSavedSettings.getControl("PreferredMaturity")->getSignal()->connect(boost::bind(&LLAgent::handleMaturity, this, _2)); + + LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback(boost::bind(&LLAgent::parcelChangedCallback)); + + LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Agent.IsActionAllowed", boost::bind(&LLAgent::isActionAllowed, _2)); + LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Agent.PressMicrophone", boost::bind(&LLAgent::pressMicrophone, _2)); + LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Agent.ReleaseMicrophone", boost::bind(&LLAgent::releaseMicrophone, _2)); + LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Agent.IsMicrophoneOn", boost::bind(&LLAgent::isMicrophoneOn, _2)); + mInitialized = TRUE; } |