diff options
author | Merov Linden <merov@lindenlab.com> | 2011-10-19 19:44:30 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2011-10-19 19:44:30 -0700 |
commit | aa3f5edc83a6a20f0473fff6f28fdad6f5406dc2 (patch) | |
tree | 192da0c80b9b9b76486c2b174297b9dfd8f8b7de /indra/newview/llagent.cpp | |
parent | c8499a7b607171507df8cbb6f415dfaa66699b2a (diff) | |
parent | 832a509c38035447ece2d0ae77c8661311e72d7e (diff) |
Pull from richard/viewer-experience-fui
Diffstat (limited to 'indra/newview/llagent.cpp')
-rwxr-xr-x | indra/newview/llagent.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 773e20eda7..21cb3380c9 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -175,7 +175,7 @@ bool LLAgent::isActionAllowed(const LLSD& sdname) } else if (param == "speak") { - if ( gAgent.isVoiceConnected() ) + if ( gAgent.isVoiceConnected() && LLViewerParcelMgr::getInstance()->allowAgentVoice() ) { retval = true; } @@ -305,13 +305,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 +326,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; } |