diff options
| author | Merov Linden <merov@lindenlab.com> | 2011-05-07 11:01:58 -0700 |
|---|---|---|
| committer | Merov Linden <merov@lindenlab.com> | 2011-05-07 11:01:58 -0700 |
| commit | 460aa3ade72fe999eebccb390ae371dfdfeaf125 (patch) | |
| tree | 0f74ec821139deb23057956e89ef7d814c82c671 /indra/newview/llpolymorph.cpp | |
| parent | c03eb76bcf66665ee8a7618dbec0d13e3fc66c32 (diff) | |
| parent | 51c779b5e832a0c303b4c84c7263c7fed3bd9b30 (diff) | |
Merge with viewer-experience
Diffstat (limited to 'indra/newview/llpolymorph.cpp')
| -rw-r--r-- | indra/newview/llpolymorph.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/newview/llpolymorph.cpp b/indra/newview/llpolymorph.cpp index 5a67fd482a..36f8c8d13e 100644 --- a/indra/newview/llpolymorph.cpp +++ b/indra/newview/llpolymorph.cpp @@ -490,6 +490,16 @@ void LLPolyMorphTarget::apply( ESex avatar_sex ) mLastSex = avatar_sex; + // Check for NaN condition (NaN is detected if a variable doesn't equal itself. + if (mCurWeight != mCurWeight) + { + mCurWeight = 0.0; + } + if (mLastWeight != mLastWeight) + { + mLastWeight = mCurWeight+.001; + } + // perform differential update of morph F32 delta_weight = ( getSex() & avatar_sex ) ? (mCurWeight - mLastWeight) : (getDefaultWeight() - mLastWeight); // store last weight |
