summaryrefslogtreecommitdiff
path: root/indra/newview/llagent.cpp
diff options
context:
space:
mode:
authorNyx Linden <nyx@lindenlab.com>2013-02-28 17:25:37 -0500
committerNyx Linden <nyx@lindenlab.com>2013-02-28 17:25:37 -0500
commitd1c144519306cae7eff7f781417482c85068988c (patch)
treeb26d8c8d89109cf9a5ec6b1bae374d35a07bde6e /indra/newview/llagent.cpp
parent998c31ef9e0631eefe07e4e678032ee90c56c859 (diff)
SH-3909 Support avatar height offset
Adding a new visual param that allows users to manually adjust an offset for how far off the ground (+ or -) their avatar's root bone is. Supports the +-2m range people are used to adjusting in their viewers, but new implementation should support server-generated appearances.
Diffstat (limited to 'indra/newview/llagent.cpp')
-rwxr-xr-xindra/newview/llagent.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index e15c1a5104..48faeb81e0 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -2332,7 +2332,7 @@ void LLAgent::setStartPosition( U32 location_id )
if (isAgentAvatarValid())
{
// the z height is at the agent's feet
- agent_pos.mV[VZ] -= 0.5f * gAgentAvatarp->mBodySize.mV[VZ];
+ agent_pos.mV[VZ] -= 0.5f * (gAgentAvatarp->mBodySize.mV[VZ] + gAgentAvatarp->mAvatarOffset.mV[VZ]);
}
agent_pos.mV[VX] = llclamp( agent_pos.mV[VX], INSET, REGION_WIDTH - INSET );
@@ -4385,7 +4385,7 @@ void LLAgent::sendAgentSetAppearance()
// NOTE -- when we start correcting all of the other Havok geometry
// to compensate for the COLLISION_TOLERANCE ugliness we will have
// to tweak this number again
- const LLVector3 body_size = gAgentAvatarp->mBodySize;
+ const LLVector3 body_size = gAgentAvatarp->mBodySize + gAgentAvatarp->mAvatarOffset;
msg->addVector3Fast(_PREHASH_Size, body_size);
// To guard against out of order packets