aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcharacter
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/llcharacter')
-rw-r--r--linden/indra/llcharacter/llkeyframemotion.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/linden/indra/llcharacter/llkeyframemotion.cpp b/linden/indra/llcharacter/llkeyframemotion.cpp
index e6ef767..4cb2227 100644
--- a/linden/indra/llcharacter/llkeyframemotion.cpp
+++ b/linden/indra/llcharacter/llkeyframemotion.cpp
@@ -1159,9 +1159,12 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8
1159 { 1159 {
1160 LLVector3 delta = source_to_target * weight; 1160 LLVector3 delta = source_to_target * weight;
1161 LLPointer<LLJointState> current_joint_state = getJointState(shared_data->mJointStateIndices[0]); 1161 LLPointer<LLJointState> current_joint_state = getJointState(shared_data->mJointStateIndices[0]);
1162 LLQuaternion parent_rot = current_joint_state->getJoint()->getParent()->getWorldRotation(); 1162 if (current_joint_state->getJoint())
1163 delta = delta * ~parent_rot; 1163 {
1164 current_joint_state->setPosition(current_joint_state->getJoint()->getPosition() + delta); 1164 LLQuaternion parent_rot = current_joint_state->getJoint()->getParent()->getWorldRotation();
1165 delta = delta * ~parent_rot;
1166 current_joint_state->setPosition(current_joint_state->getJoint()->getPosition() + delta);
1167 }
1165 } 1168 }
1166} 1169}
1167 1170