diff options
| author | prep <prep@lindenlab.com> | 2011-03-24 09:48:34 -0400 |
|---|---|---|
| committer | prep <prep@lindenlab.com> | 2011-03-24 09:48:34 -0400 |
| commit | d2bb490702921b5ca9fdcd562c67844e2d4802e1 (patch) | |
| tree | 23757871fd89a981d9e6691668d78ec6b3f52a48 /indra/newview/llvoavatar.cpp | |
| parent | 3ad81bb4a642d25018b773d2ef005380664d8170 (diff) | |
Crash fix for SH-1176 and WIP for pelvis z offset
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
| -rw-r--r-- | indra/newview/llvoavatar.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 5f0e4bcded..7468281f65 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1333,7 +1333,17 @@ const LLVector3 LLVOAvatar::getRenderPosition() const }
else if (isRoot())
{
- return mDrawable->getPositionAgent();
+ if ( !mHasPelvisOffset )
+ {
+ return mDrawable->getPositionAgent();
+ }
+ else
+ {
+ //Apply a pelvis fixup (as defined by the avs skin)
+ LLVector3 pos = mDrawable->getPositionAgent();
+ pos[VZ] += mPelvisFixup;
+ return pos;
+ }
}
else
{
@@ -3810,6 +3820,14 @@ void LLVOAvatar::postPelvisSetRecalc( void ) updateHeadOffset();
}
//------------------------------------------------------------------------
+// pelisPoke
+//------------------------------------------------------------------------
+void LLVOAvatar::setPelvisOffset( F32 pelvisFixupAmount )
+{
+ mHasPelvisOffset = true;
+ mPelvisFixup = pelvisFixupAmount;
+}
+//------------------------------------------------------------------------
// updateVisibility()
//------------------------------------------------------------------------
void LLVOAvatar::updateVisibility()
|
