diff options
author | prep <prep@lindenlab.com> | 2011-03-28 17:50:12 -0400 |
---|---|---|
committer | prep <prep@lindenlab.com> | 2011-03-28 17:50:12 -0400 |
commit | 86f3c3f276f131c4a192268733e7fc8b7e81d2c9 (patch) | |
tree | 92bf952177ad8c15679ddedd0f87c2974b64d5c7 | |
parent | 835671f27809ce8e5ab17e6c299be35260239d51 (diff) |
Fix for issue caused by uploading the TurboSquid book collection (that avatar was having it's joints reet)
-rwxr-xr-x | indra/newview/llfloatermodelpreview.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llvoavatar.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llvoavatar.h | 1 |
3 files changed, 14 insertions, 5 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index e440fa52d4..eebeb53cdb 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -389,7 +389,11 @@ LLFloaterModelPreview::~LLFloaterModelPreview() gAgentAvatarp->resetJointPositions();
}
- delete mModelPreview;
+
+ if ( mModelPreview )
+ {
+ delete mModelPreview;
+ }
if (mGLName)
{
@@ -1556,7 +1560,7 @@ bool LLModelLoader::doLoadModel() //a skinned asset attached to a node in a file that contains an entire skeleton,
//but does not use the skeleton).
mPreview->setRigValid( doesJointArrayContainACompleteRig( model->mJointList ) );
- if ( !skeletonWithNoRootNode && !model->mJointList.empty() && mPreview->isRigValid() )
+ if ( !skeletonWithNoRootNode && !model->mJointList.empty() && mPreview->isRigValid() )
{
mResetJoints = true;
}
@@ -1878,8 +1882,6 @@ void LLModelLoader::loadModelCallback() { //wait until this thread is stopped before deleting self
apr_sleep(100);
}
-
- delete this;
}
void LLModelLoader::handlePivotPoint( daeElement* pRoot )
@@ -2454,7 +2456,8 @@ LLModelPreview::LLModelPreview(S32 width, S32 height, LLFloater* fmp) LLModelPreview::~LLModelPreview()
{
if (mModelLoader)
- {
+ {
+ delete mModelLoader;
mModelLoader->mPreview = NULL;
}
//*HACK : *TODO : turn this back on when we understand why this crashes
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 7468281f65..71706f0146 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -762,6 +762,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, mPelvisOffset = LLVector3(0.0f,0.0f,0.0f);
mLastPelvisToFoot = 0.0f;
mPelvisFixup = 0.0f;
+ mLastPelvisFixup = 0.0f;
}
//------------------------------------------------------------------------
@@ -3805,6 +3806,7 @@ void LLVOAvatar::setPelvisOffset( bool hasOffset, const LLVector3& offsetAmount, //Store off last pelvis to foot value
mLastPelvisToFoot = mPelvisToFoot;
mPelvisOffset = offsetAmount;
+ mLastPelvisFixup = mPelvisFixup;
mPelvisFixup = pelvisFixup;
}
}
@@ -3825,6 +3827,7 @@ void LLVOAvatar::postPelvisSetRecalc( void ) void LLVOAvatar::setPelvisOffset( F32 pelvisFixupAmount )
{
mHasPelvisOffset = true;
+ mLastPelvisFixup = mPelvisFixup;
mPelvisFixup = pelvisFixupAmount;
}
//------------------------------------------------------------------------
@@ -4965,6 +4968,7 @@ void LLVOAvatar::resetJointPositions( void ) mSkeleton[i].setId( LLUUID::null );
}
mHasPelvisOffset = false;
+ mPelvisFixup = mLastPelvisFixup;
}
//-----------------------------------------------------------------------------
// resetSpecificJointPosition
@@ -5024,6 +5028,7 @@ void LLVOAvatar::resetJointPositionsToDefault( void ) }
//make sure we don't apply the joint offset
mHasPelvisOffset = false;
+ mPelvisFixup = mLastPelvisFixup;
postPelvisSetRecalc();
}
//-----------------------------------------------------------------------------
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 1552532a97..edec1b480a 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -301,6 +301,7 @@ public: LLVector3 mPelvisOffset;
F32 mLastPelvisToFoot;
F32 mPelvisFixup;
+ F32 mLastPelvisFixup;
LLVector3 mHeadOffset; // current head position
LLViewerJoint mRoot;
|