summaryrefslogtreecommitdiff
path: root/indra/newview/llagentcamera.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2011-01-07 10:39:05 -0500
committerOz Linden <oz@lindenlab.com>2011-01-07 10:39:05 -0500
commite1e38c4cee980f815091cd94c8a529ffe3e24918 (patch)
tree35b16f61bd120f83bb74a77d4417dce1108e0542 /indra/newview/llagentcamera.cpp
parentc02d6a319f378d5dcc34c51b20f556f175d2a40a (diff)
parent09c01c4e925833873a83665fe0642637b65e547e (diff)
merge changes for storm-34
Diffstat (limited to 'indra/newview/llagentcamera.cpp')
-rw-r--r--indra/newview/llagentcamera.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index 7c953cd2dc..f01d5ff1f5 100644
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -2041,7 +2041,7 @@ void LLAgentCamera::resetCamera()
//-----------------------------------------------------------------------------
void LLAgentCamera::changeCameraToMouselook(BOOL animate)
{
- if (LLViewerJoystick::getInstance()->getOverrideCamera())
+ if (!gSavedSettings.getBOOL("EnableMouselook") || LLViewerJoystick::getInstance()->getOverrideCamera())
{
return;
}
@@ -2695,6 +2695,9 @@ void LLAgentCamera::lookAtLastChat()
new_camera_pos -= delta_pos * 0.4f;
new_camera_pos += left * 0.3f;
new_camera_pos += up * 0.2f;
+
+ setFocusOnAvatar(FALSE, FALSE);
+
if (chatter_av->mHeadp)
{
setFocusGlobal(gAgent.getPosGlobalFromAgent(chatter_av->mHeadp->getWorldPosition()), gAgent.getLastChatter());
@@ -2705,7 +2708,6 @@ void LLAgentCamera::lookAtLastChat()
setFocusGlobal(chatter->getPositionGlobal(), gAgent.getLastChatter());
mCameraFocusOffsetTarget = gAgent.getPosGlobalFromAgent(new_camera_pos) - chatter->getPositionGlobal();
}
- setFocusOnAvatar(FALSE, TRUE);
}
else
{
@@ -2725,9 +2727,10 @@ void LLAgentCamera::lookAtLastChat()
new_camera_pos += left * 0.3f;
new_camera_pos += up * 0.2f;
+ setFocusOnAvatar(FALSE, FALSE);
+
setFocusGlobal(chatter->getPositionGlobal(), gAgent.getLastChatter());
mCameraFocusOffsetTarget = gAgent.getPosGlobalFromAgent(new_camera_pos) - chatter->getPositionGlobal();
- setFocusOnAvatar(FALSE, TRUE);
}
}