summaryrefslogtreecommitdiff
path: root/indra/newview/llcallingcard.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/llcallingcard.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/llcallingcard.cpp')
-rw-r--r--indra/newview/llcallingcard.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp
index 0d55c4429a..0b8f863e75 100644
--- a/indra/newview/llcallingcard.cpp
+++ b/indra/newview/llcallingcard.cpp
@@ -183,7 +183,8 @@ LLVector3d LLAvatarTracker::getGlobalPos()
global_pos = object->getPositionGlobal();
// HACK - for making the tracker point above the avatar's head
// rather than its groin
- global_pos.mdV[VZ] += 0.7f * ((LLVOAvatar *)object)->mBodySize.mV[VZ];
+ LLVOAvatar* av = (LLVOAvatar*)object;
+ global_pos.mdV[VZ] += 0.7f * (av->mBodySize.mV[VZ] + av->mAvatarOffset.mV[VZ]);
mTrackingData->mGlobalPositionEstimate = global_pos;
}