summaryrefslogtreecommitdiff
path: root/indra/newview/llagent.cpp
diff options
context:
space:
mode:
authorAura Linden <aura@lindenlab.com>2014-09-18 17:00:23 -0700
committerAura Linden <aura@lindenlab.com>2014-09-18 17:00:23 -0700
commit951c83724d7e364ac52cbee2d657711fda7d2c26 (patch)
tree20b95debd0a3bb52f32df0db52d6dc91caf5793f /indra/newview/llagent.cpp
parent78304e398fa7d4604eac98247173b33d712ec135 (diff)
parent61fb8c3fe31c73ce9121daac545aa7c8fc79ec8c (diff)
Merged in viewer-tiger
Diffstat (limited to 'indra/newview/llagent.cpp')
-rwxr-xr-xindra/newview/llagent.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index bd6025feea..ef1d528aa2 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());
@@ -4105,8 +4116,8 @@ void LLAgent::stopCurrentAnimations()
anim_it != gAgentAvatarp->mPlayingAnimations.end();
anim_it++)
{
- if (anim_it->first ==
- ANIM_AGENT_SIT_GROUND_CONSTRAINED)
+ if ((anim_it->first == ANIM_AGENT_DO_NOT_DISTURB)||
+ (anim_it->first == ANIM_AGENT_SIT_GROUND_CONSTRAINED))
{
// don't cancel a ground-sit anim, as viewers
// use this animation's status in