summaryrefslogtreecommitdiff
path: root/indra/newview/llagent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llagent.cpp')
-rwxr-xr-xindra/newview/llagent.cpp33
1 files changed, 12 insertions, 21 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index f8b204eca0..54ad3cd187 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -205,6 +205,12 @@ void LLAgent::releaseMicrophone(const LLSD& name)
}
// static
+void LLAgent::toggleMicrophone(const LLSD& name)
+{
+ LLVoiceClient::getInstance()->toggleUserPTTState();
+}
+
+// static
bool LLAgent::isMicrophoneOn(const LLSD& sdname)
{
return LLVoiceClient::getInstance()->getUserPTTState();
@@ -331,12 +337,6 @@ void LLAgent::init()
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;
}
@@ -1101,20 +1101,11 @@ F32 LLAgent::clampPitchToLimits(F32 angle)
LLVector3 skyward = getReferenceUpVector();
- F32 look_down_limit;
- F32 look_up_limit = 10.f * DEG_TO_RAD;
+ const F32 look_down_limit = 179.f * DEG_TO_RAD;;
+ const F32 look_up_limit = 1.f * DEG_TO_RAD;
F32 angle_from_skyward = acos( mFrameAgent.getAtAxis() * skyward );
- if (isAgentAvatarValid() && gAgentAvatarp->isSitting())
- {
- look_down_limit = 130.f * DEG_TO_RAD;
- }
- else
- {
- look_down_limit = 170.f * DEG_TO_RAD;
- }
-
// clamp pitch to limits
if ((angle >= 0.f) && (angle_from_skyward + angle > look_down_limit))
{
@@ -4004,14 +3995,14 @@ void LLAgent::renderAutoPilotTarget()
F32 height_meters;
LLVector3d target_global;
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.pushMatrix();
// not textured
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
// lovely green
- glColor4f(0.f, 1.f, 1.f, 1.f);
+ gGL.color4f(0.f, 1.f, 1.f, 1.f);
target_global = mAutoPilotTargetGlobal;
@@ -4019,9 +4010,9 @@ void LLAgent::renderAutoPilotTarget()
height_meters = 1.f;
- glScalef(height_meters, height_meters, height_meters);
+ gGL.scalef(height_meters, height_meters, height_meters);
- gSphere.render(1500.f);
+ gSphere.render();
gGL.popMatrix();
}