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 b0b2cfd435..4f064b68f3 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),
@@ -1154,8 +1155,10 @@ void LLAgentCamera::updateCamera()
mCameraUpVector = mCameraUpVector * gAgentAvatarp->getRenderRotation();
}
- if (cameraThirdPerson() && mFocusOnAvatar && LLFollowCamMgr::getActiveFollowCamParams())
+ if (cameraThirdPerson() && (mFocusOnAvatar || mAllowChangeToFollow) && LLFollowCamMgr::getActiveFollowCamParams())
{
+ mAllowChangeToFollow = FALSE;
+ mFocusOnAvatar = TRUE;
changeCameraToFollow();
}
@@ -2612,6 +2615,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;