From b01d567a5d9e2b5dd28bcc7b3f474fabd93e7a2f Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Fri, 7 Dec 2007 20:27:13 +0000 Subject: 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 --- indra/llcharacter/llkeyframefallmotion.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'indra/llcharacter/llkeyframefallmotion.cpp') 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; jmmNumJointMotions; jm++) + for (U32 jm=0; jmgetNumJointMotions(); 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; } -- cgit v1.2.3