diff options
| author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-11-18 09:39:14 -0500 | 
|---|---|---|
| committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-11-18 09:39:14 -0500 | 
| commit | 4c2144e1153fb71544140bb51630b13e17ead6d3 (patch) | |
| tree | e261da72a379647c74bc0e01da3900a5385802e3 | |
| parent | d31596db6a6c5f7ef8c57bfaa42496db4a9b471e (diff) | |
SL-534 - make handling of other-gender sliders more consistent. Fixes mGroin bug.
| -rw-r--r-- | indra/llappearance/llpolyskeletaldistortion.cpp | 82 | 
1 files changed, 41 insertions, 41 deletions
| diff --git a/indra/llappearance/llpolyskeletaldistortion.cpp b/indra/llappearance/llpolyskeletaldistortion.cpp index 5662fdd6bc..5b77a7433a 100644 --- a/indra/llappearance/llpolyskeletaldistortion.cpp +++ b/indra/llappearance/llpolyskeletaldistortion.cpp @@ -192,52 +192,52 @@ static LLTrace::BlockTimerStatHandle FTM_POLYSKELETAL_DISTORTION_APPLY("Skeletal  void LLPolySkeletalDistortion::apply( ESex avatar_sex )  { -	LL_RECORD_BLOCK_TIME(FTM_POLYSKELETAL_DISTORTION_APPLY); +    LL_RECORD_BLOCK_TIME(FTM_POLYSKELETAL_DISTORTION_APPLY); -	F32 effective_weight = ( getSex() & avatar_sex ) ? mCurWeight : getDefaultWeight(); +    F32 effective_weight = ( getSex() & avatar_sex ) ? mCurWeight : getDefaultWeight(); -        LLJoint* joint; -        joint_vec_map_t::iterator iter; +    LLJoint* joint; +    joint_vec_map_t::iterator iter; -        for (iter = mJointScales.begin(); -             iter != mJointScales.end(); -             iter++) -        { -                joint = iter->first; -                LLVector3 newScale = joint->getScale(); -                LLVector3 scaleDelta = iter->second; -                LLVector3 offset = (effective_weight - mLastWeight) * scaleDelta; -                newScale = newScale + offset; -				//An aspect of attached mesh objects (which contain joint offsets) that need to be cleaned up when detached -				// needed?  -				// joint->storeScaleForReset( newScale );				 - -                // BENTO for detailed stack tracing of params. -                std::stringstream ostr; -                ostr << "LLPolySkeletalDistortion::apply, id " << getID() << " " << getName() << " effective wt " << effective_weight << " last wt " << mLastWeight << " scaleDelta " << scaleDelta << " offset " << offset; -                LLScopedContextString str(ostr.str()); - -				joint->setScale(newScale, true); -        } +    for (iter = mJointScales.begin(); +         iter != mJointScales.end(); +         iter++) +    { +        joint = iter->first; +        LLVector3 newScale = joint->getScale(); +        LLVector3 scaleDelta = iter->second; +        LLVector3 offset = (effective_weight - mLastWeight) * scaleDelta; +        newScale = newScale + offset; +        //An aspect of attached mesh objects (which contain joint offsets) that need to be cleaned up when detached +        // needed?  +        // joint->storeScaleForReset( newScale );				 + +        // BENTO for detailed stack tracing of params. +        std::stringstream ostr; +        ostr << "LLPolySkeletalDistortion::apply, id " << getID() << " " << getName() << " effective wt " << effective_weight << " last wt " << mLastWeight << " scaleDelta " << scaleDelta << " offset " << offset; +        LLScopedContextString str(ostr.str()); + +        joint->setScale(newScale, true); +    } -        for (iter = mJointOffsets.begin(); -             iter != mJointOffsets.end(); -             iter++) -        { -                joint = iter->first; -                LLVector3 newPosition = joint->getPosition(); -                LLVector3 positionDelta = iter->second;				 -                newPosition = newPosition + (effective_weight * positionDelta) - (mLastWeight * positionDelta);		 -                // SL-315 -                bool allow_attachment_pos_overrides = true; -                joint->setPosition(newPosition, allow_attachment_pos_overrides); -        } +    for (iter = mJointOffsets.begin(); +         iter != mJointOffsets.end(); +         iter++) +    { +        joint = iter->first; +        LLVector3 newPosition = joint->getPosition(); +        LLVector3 positionDelta = iter->second;				 +        newPosition = newPosition + (effective_weight * positionDelta) - (mLastWeight * positionDelta);		 +        // SL-315 +        bool allow_attachment_pos_overrides = true; +        joint->setPosition(newPosition, allow_attachment_pos_overrides); +    } -        if (mLastWeight != mCurWeight && !mIsAnimating) -        { -                mAvatar->setSkeletonSerialNum(mAvatar->getSkeletonSerialNum() + 1); -        } -        mLastWeight = mCurWeight; +    if (mLastWeight != effective_weight && !mIsAnimating) +    { +        mAvatar->setSkeletonSerialNum(mAvatar->getSkeletonSerialNum() + 1); +    } +    mLastWeight = effective_weight;  } | 
