diff options
Diffstat (limited to 'indra/llcharacter/llpose.cpp')
-rw-r--r-- | indra/llcharacter/llpose.cpp | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/indra/llcharacter/llpose.cpp b/indra/llcharacter/llpose.cpp index 557bbd2d56..2120cb223e 100644 --- a/indra/llcharacter/llpose.cpp +++ b/indra/llcharacter/llpose.cpp @@ -379,15 +379,20 @@ void LLJointStateBlender::blendJointStates(BOOL apply_now) } } - // apply blended transforms - target_joint->setPosition(blended_pos); - target_joint->setScale(blended_scale); - target_joint->setRotation(blended_rot); - - // apply additive transforms - target_joint->setPosition(target_joint->getPosition() + added_pos); - target_joint->setScale(target_joint->getScale() + added_scale); - target_joint->setRotation(added_rot * target_joint->getRotation()); + if (!added_scale.isFinite()) + { + added_scale.clearVec(); + } + + if (!blended_scale.isFinite()) + { + blended_scale.setVec(1,1,1); + } + + // apply transforms + target_joint->setPosition(blended_pos + added_pos); + target_joint->setScale(blended_scale + added_scale); + target_joint->setRotation(added_rot * blended_rot); if (apply_now) { |