summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMnikolenko ProductEngine <mnikolenko@productengine.com>2014-07-01 11:01:43 +0300
committerMnikolenko ProductEngine <mnikolenko@productengine.com>2014-07-01 11:01:43 +0300
commit7932a77319c629c16f3bc1217dd04167c5687ae4 (patch)
tree03805426e21320989a2689c51d22541c1674f61b
parentf21ad12b376da6c82f79c61ff7d25b692da70d87 (diff)
MAINT-3885 FIXED Don't set focus on avatar after double-click-teleport if camera was locked.
-rwxr-xr-xindra/newview/llagent.cpp7
-rwxr-xr-xindra/newview/llagentcamera.cpp5
-rwxr-xr-xindra/newview/llagentcamera.h1
3 files changed, 12 insertions, 1 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index c9b9e072be..b879f64596 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -4059,7 +4059,12 @@ void LLAgent::teleportViaLocationLookAt(const LLVector3d& pos_global)
void LLAgent::doTeleportViaLocationLookAt(const LLVector3d& pos_global)
{
mbTeleportKeepsLookAt = true;
- gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); // detach camera form avatar, so it keeps direction
+
+ if(!gAgentCamera.isfollowCamLocked())
+ {
+ gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); // detach camera form avatar, so it keeps direction
+ }
+
U64 region_handle = to_region_handle(pos_global);
LLVector3 pos_local = (LLVector3)(pos_global - from_region_handle(region_handle));
teleportRequest(region_handle, pos_local, getTeleportKeepsLookAt());
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index 7b0496ea45..2356a84688 100755
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -2721,6 +2721,11 @@ void LLAgentCamera::lookAtLastChat()
}
}
+bool LLAgentCamera::isfollowCamLocked()
+{
+ return mFollowCam.getPositionLocked();
+}
+
BOOL LLAgentCamera::setPointAt(EPointAtType target_type, LLViewerObject *object, LLVector3 position)
{
// disallow pointing at attachments and avatars
diff --git a/indra/newview/llagentcamera.h b/indra/newview/llagentcamera.h
index 00fa6ea189..4d0f9a80de 100755
--- a/indra/newview/llagentcamera.h
+++ b/indra/newview/llagentcamera.h
@@ -155,6 +155,7 @@ private:
//--------------------------------------------------------------------
public:
void setUsingFollowCam(bool using_follow_cam);
+ bool isfollowCamLocked();
private:
LLFollowCam mFollowCam; // Ventrella