diff options
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rwxr-xr-x | indra/newview/llvoavatar.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 4d6f0f78b2..9bee4380eb 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1807,6 +1807,27 @@ void LLVOAvatar::buildCharacter() void LLVOAvatar::resetSkeleton() { LL_DEBUGS("Avatar") << avString() << LL_ENDL; + + // Reset params + for (LLVisualParam *param = getFirstVisualParam(); + param; + param = getNextVisualParam()) + { + if (param->isAnimating()) + { + continue; + } + param->setLastWeight(param->getDefaultWeight()); + } + + // Reset all bones and collision volumes to their initial skeleton state. + if( !buildSkeleton(sAvatarSkeletonInfo) ) + { + LL_ERRS() << "Error resetting skeleton" << LL_ENDL; + } + + // Apply params + updateVisualParams(); } //----------------------------------------------------------------------------- |