diff options
| author | Dave Parks <davep@lindenlab.com> | 2011-04-19 16:35:37 -0500 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2011-04-19 16:35:37 -0500 |
| commit | 5cf5e4bb888e67dc1dd79eaec491b242a7f3a903 (patch) | |
| tree | 7b43bff3ea4e1309c6ae4b9bd1fd8ada251f7a52 /indra/newview/llpolymorph.cpp | |
| parent | 25566075980d45c30ee25603d94454e081119210 (diff) | |
| parent | 3b5d6eed12d928e5a7a0bc3a8d827f676b25d060 (diff) | |
merge
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 a48620bf13..cefd7df3fe 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 |
