summaryrefslogtreecommitdiff
path: root/indra/newview/llagent.cpp
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2014-09-22 18:51:19 -0400
committerMonty Brandenberg <monty@lindenlab.com>2014-09-22 18:51:19 -0400
commit620817c1c3368d73f1b47b1593a0bcbcf567e297 (patch)
treee37b76dc8d154ab661ab23e6be2b6b098f97e4b2 /indra/newview/llagent.cpp
parent329608d24668b044e16b54ff7a7d0ac592b2b88d (diff)
parent8897e7ca24533e0093825346391f5fa9a37f2427 (diff)
Merge. Refresh from viewer-drano-http-4 after release of 3.7.16.
Diffstat (limited to 'indra/newview/llagent.cpp')
-rwxr-xr-xindra/newview/llagent.cpp15
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());