diff options
author | Graham Linden <none@none> | 2014-09-25 09:20:01 -0700 |
---|---|---|
committer | Graham Linden <none@none> | 2014-09-25 09:20:01 -0700 |
commit | 9f4788d7a8a924de654d55bfb102a81f797a9cf9 (patch) | |
tree | 742fb8127dc84052265647ed110e8a6446253103 /indra/newview/llagent.cpp | |
parent | 6004ad167458914c3b85438b96e81ea8796e368b (diff) | |
parent | 499f5aa9a4b46d61ee94b26d5c86bc032766af70 (diff) |
Merge viewer-release 3.7.17
Diffstat (limited to 'indra/newview/llagent.cpp')
-rwxr-xr-x | indra/newview/llagent.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index bd6025feea..e5a90e8a28 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -3712,6 +3712,12 @@ bool LLAgent::teleportCore(bool is_local) return false; } + // force stand up and stop a sitting animation (if any), see MAINT-3969 + if (isAgentAvatarValid() && gAgentAvatarp->getParent() && gAgentAvatarp->isSitting()) + { + gAgentAvatarp->getOffObject(); + } + #if 0 // This should not exist. It has been added, removed, added, and now removed again. // This change needs to come from the simulator. Otherwise, the agent ends up out of @@ -3887,7 +3893,7 @@ void LLAgent::teleportRequest( bool look_at_from_camera) { LLViewerRegion* regionp = getRegion(); - bool is_local = (region_handle == to_region_handle(getPositionGlobal())); + bool is_local = (region_handle == regionp->getHandle()); if(regionp && teleportCore(is_local)) { LL_INFOS("") << "TeleportLocationRequest: '" << region_handle << "':" @@ -4054,7 +4060,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()); |