summaryrefslogtreecommitdiff
path: root/indra/llappearance
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2016-03-10 10:12:25 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2016-03-10 10:12:25 -0500
commit05bd94268d99a34b4f4b1556e3088cbf134034f9 (patch)
tree12a585c5a1c6fd6297f31e5e3b7b312b0cde67b1 /indra/llappearance
parentd56533609431b213810928d204e3720fecd42b82 (diff)
SL-315 - wip on joint reset
Diffstat (limited to 'indra/llappearance')
-rwxr-xr-xindra/llappearance/llavatarappearance.cpp29
1 files changed, 17 insertions, 12 deletions
diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp
index 3bf8ae6036..9b9657b4c8 100755
--- a/indra/llappearance/llavatarappearance.cpp
+++ b/indra/llappearance/llavatarappearance.cpp
@@ -643,9 +643,11 @@ BOOL LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent
//-----------------------------------------------------------------------------
BOOL LLAvatarAppearance::allocateCharacterJoints( U32 num )
{
- clearSkeleton();
-
- mSkeleton = avatar_joint_list_t(num,NULL);
+ if (mSkeleton.size() != num)
+ {
+ clearSkeleton();
+ mSkeleton = avatar_joint_list_t(num,NULL);
+ }
return TRUE;
}
@@ -1510,16 +1512,19 @@ LLTexLayerSet* LLAvatarAppearance::getAvatarLayerSet(EBakedTextureIndex baked_in
//-----------------------------------------------------------------------------
BOOL LLAvatarAppearance::allocateCollisionVolumes( U32 num )
{
- delete_and_clear_array(mCollisionVolumes);
- mNumCollisionVolumes = 0;
-
- mCollisionVolumes = new LLAvatarJointCollisionVolume[num];
- if (!mCollisionVolumes)
- {
- return FALSE;
- }
+ if (mNumCollisionVolumes !=num)
+ {
+ delete_and_clear_array(mCollisionVolumes);
+ mNumCollisionVolumes = 0;
- mNumCollisionVolumes = num;
+ mCollisionVolumes = new LLAvatarJointCollisionVolume[num];
+ if (!mCollisionVolumes)
+ {
+ return FALSE;
+ }
+
+ mNumCollisionVolumes = num;
+ }
return TRUE;
}