summaryrefslogtreecommitdiff
path: root/indra/newview/llagentcamera.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llagentcamera.cpp')
-rwxr-xr-xindra/newview/llagentcamera.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index 7f0330ee99..aed27924fe 100755
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -147,6 +147,7 @@ LLAgentCamera::LLAgentCamera() :
mCameraUpVector(LLVector3::z_axis), // default is straight up
mFocusOnAvatar(TRUE),
+ mAllowChangeToFollow(FALSE),
mFocusGlobal(),
mFocusTargetGlobal(),
mFocusObject(NULL),
@@ -1152,8 +1153,10 @@ void LLAgentCamera::updateCamera()
mCameraUpVector = mCameraUpVector * gAgentAvatarp->getRenderRotation();
}
- if (cameraThirdPerson() && mFocusOnAvatar && LLFollowCamMgr::getActiveFollowCamParams())
+ if (cameraThirdPerson() && (mFocusOnAvatar || mAllowChangeToFollow) && LLFollowCamMgr::getActiveFollowCamParams())
{
+ mAllowChangeToFollow = FALSE;
+ mFocusOnAvatar = TRUE;
changeCameraToFollow();
}
@@ -2610,6 +2613,7 @@ void LLAgentCamera::setFocusOnAvatar(BOOL focus_on_avatar, BOOL animate)
{
// keep camera focus point consistent, even though it is now unlocked
setFocusGlobal(gAgent.getPositionGlobal() + calcThirdPersonFocusOffset(), gAgent.getID());
+ mAllowChangeToFollow = FALSE;
}
mFocusOnAvatar = focus_on_avatar;