diff options
| author | Don Kjer <don@lindenlab.com> | 2011-04-14 18:27:31 +0000 |
|---|---|---|
| committer | Don Kjer <don@lindenlab.com> | 2011-04-14 18:27:31 +0000 |
| commit | 01f4570c795b197e74bfa96139631c43df8d0664 (patch) | |
| tree | 7c1952cc51adec21025f537281e59f828e75224d /indra/newview/llpolymorph.cpp | |
| parent | 2bf967149626672584b17b53fb5d2e6186f3d896 (diff) | |
| parent | 88a7262340f2fc5085f4ac6600790518d01292d6 (diff) | |
Merge with viewer-development
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 |
