diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-05-18 17:07:54 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-05-18 17:07:54 -0400 |
commit | e8afa4c413efac9f58fbfccb1c14c114317a383e (patch) | |
tree | 6286b65863b85fcdf1c756933cd558815ade1272 /indra/newview | |
parent | bb2c147c26efad32f72fd7cdf1378824a4b0085d (diff) |
SL-315 - fixed collision volume scale issue in resetSkeleton()
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llvoavatar.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 23008839ee..fb7b7d3ef8 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1854,20 +1854,30 @@ void LLVOAvatar::resetSkeleton() return; } - // Stop all animations - // Clear all attachment pos overrides clearAttachmentPosOverrides(); + // Note that we call buildSkeleton twice in this function. The first time is + // just to get the right scale for the collision volumes, because + // this will be used in setting the mJointScales for the + // LLPolySkeletalDistortions of which the CVs are children. + if( !buildSkeleton(sAvatarSkeletonInfo) ) + { + LL_ERRS() << "Error resetting skeleton" << LL_ENDL; + } + // Reset some params to default state, without propagating changes downstream. resetVisualParams(); - // Reset all bones and collision volumes to their initial skeleton state. + // Now we have to reset the skeleton again, because its state + // got clobbered by the resetVisualParams() calls + // above. if( !buildSkeleton(sAvatarSkeletonInfo) ) { LL_ERRS() << "Error resetting skeleton" << LL_ENDL; } - // Reset attachment points + + // Reset attachment points (buildSkeleton only does bones and CVs) bool ignore_hud_joints = true; initAttachmentPoints(ignore_hud_joints); @@ -1897,6 +1907,7 @@ void LLVOAvatar::resetSkeleton() rebuildAttachmentPosOverrides(); // Restart animations + resetAnimations(); LL_DEBUGS("Avatar") << avString() << " reset ends" << LL_ENDL; } |