diff options
| author | Steven Bennetts <steve@lindenlab.com> | 2007-12-07 20:27:13 +0000 |
|---|---|---|
| committer | Steven Bennetts <steve@lindenlab.com> | 2007-12-07 20:27:13 +0000 |
| commit | b01d567a5d9e2b5dd28bcc7b3f474fabd93e7a2f (patch) | |
| tree | c45377783f53f033d43a4d06d36bbeb2a7f7e79b /indra/llcharacter/llkeyframefallmotion.cpp | |
| parent | a64f283477ea4db09c8b515ab94709e1fb5c82af (diff) | |
EFFECTIVE MERGE: merge release@73232 maint-viewer-2@75100 -> maint-viewer-2-merge
EFFECTIVE MERGE: merge -r 74370 library-update -> maint-viewer-2-merge
ACTUAL MERGE: release@75267 maint-viewer-2-merge@75293 -> release
Diffstat (limited to 'indra/llcharacter/llkeyframefallmotion.cpp')
| -rw-r--r-- | indra/llcharacter/llkeyframefallmotion.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/indra/llcharacter/llkeyframefallmotion.cpp b/indra/llcharacter/llkeyframefallmotion.cpp index bcef7a3fda..13308f4e4a 100644 --- a/indra/llcharacter/llkeyframefallmotion.cpp +++ b/indra/llcharacter/llkeyframefallmotion.cpp @@ -75,13 +75,13 @@ LLMotion::LLMotionInitStatus LLKeyframeFallMotion::onInitialize(LLCharacter *cha // load keyframe data, setup pose and joint states LLMotion::LLMotionInitStatus result = LLKeyframeMotion::onInitialize(character); - for (U32 jm=0; jm<mJointMotionList->mNumJointMotions; jm++) + for (U32 jm=0; jm<mJointMotionList->getNumJointMotions(); jm++) { - if (!mJointStates[jm].getJoint()) + if (!mJointStates[jm]->getJoint()) continue; - if (mJointStates[jm].getJoint()->getName() == std::string("mPelvis")) + if (mJointStates[jm]->getJoint()->getName() == std::string("mPelvis")) { - mPelvisStatep = &mJointStates[jm]; + mPelvisState = mJointStates[jm]; } } @@ -124,8 +124,11 @@ BOOL LLKeyframeFallMotion::onUpdate(F32 activeTime, U8* joint_mask) BOOL result = LLKeyframeMotion::onUpdate(activeTime, joint_mask); F32 slerp_amt = clamp_rescale(activeTime / getDuration(), 0.5f, 0.75f, 0.f, 1.f); - mPelvisStatep->setRotation(mPelvisStatep->getRotation() * slerp(slerp_amt, mRotationToGroundNormal, LLQuaternion())); - + if (mPelvisState.notNull()) + { + mPelvisState->setRotation(mPelvisState->getRotation() * slerp(slerp_amt, mRotationToGroundNormal, LLQuaternion())); + } + return result; } |
