From ef8ce5bf5eb3325dec8a51d27ca01ddab47f183c Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 7 Apr 2011 12:55:12 -0400 Subject: SH-1319: Fix for disappearing torso sections on avatars --- indra/newview/llpolymorph.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra/newview/llpolymorph.cpp') 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 -- cgit v1.2.3