diff options
author | Oz Linden <oz@lindenlab.com> | 2011-04-10 22:37:53 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2011-04-10 22:37:53 -0400 |
commit | e2baffa940a5797f2055f13ceb9722de524b2ec3 (patch) | |
tree | bf53bf6b8856a20d732f57d41a28a2c71941ac65 /indra/newview/llpolymorph.cpp | |
parent | 74787fda486a68e344caf125fc76c80ca9c40822 (diff) | |
parent | c77fcfb7a8aeb2f271b050171bf0d6a9bd4c955b (diff) |
merge changes for storm-610
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 |