summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2016-08-12 14:20:44 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2016-08-12 14:20:44 -0400
commit85a13b53f5570c44c476a7af70846874dfc3ecbf (patch)
tree69c5230d129510c7d5abcf54b718f9969c0a2831 /indra
parent95d9e85f9539c449f37c438b90a90e6ac73d3b87 (diff)
MAINT-6631 - reluctantly, added support for animation of collision volumes, to avoid breaking existing content.
Diffstat (limited to 'indra')
-rw-r--r--indra/llappearance/llavatarappearance.cpp6
-rw-r--r--indra/llappearance/llavatarappearance.h2
-rw-r--r--indra/llcharacter/lljoint.h7
-rw-r--r--indra/newview/llvoavatar.cpp2
4 files changed, 11 insertions, 6 deletions
diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp
index acb43d23a1..f9745efb78 100644
--- a/indra/llappearance/llavatarappearance.cpp
+++ b/indra/llappearance/llavatarappearance.cpp
@@ -186,7 +186,8 @@ LLAvatarAppearance::LLAvatarAppearance(LLWearableData* wearable_data) :
mPelvisToFoot(0.f),
mHeadOffset(),
mRoot(NULL),
- mWearableData(wearable_data)
+ mWearableData(wearable_data),
+ mNextJointNum(0)
{
llassert_always(mWearableData);
mBakedTextureDatas.resize(LLAvatarAppearanceDefines::BAKED_NUM_INDICES);
@@ -625,6 +626,8 @@ BOOL LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent
volume_num++;
}
+ joint->setJointNum(mNextJointNum++);
+
// setup children
LLAvatarBoneInfo::child_list_t::const_iterator iter;
for (iter = info->mChildList.begin(); iter != info->mChildList.end(); ++iter)
@@ -1276,7 +1279,6 @@ LLJoint *LLAvatarAppearance::getCharacterJoint( U32 num )
if (!mSkeleton[num])
{
mSkeleton[num] = createAvatarJoint();
- mSkeleton[num]->setJointNum(num);
}
return mSkeleton[num];
}
diff --git a/indra/llappearance/llavatarappearance.h b/indra/llappearance/llavatarappearance.h
index 3865da7098..dbcc1bfcf0 100644
--- a/indra/llappearance/llavatarappearance.h
+++ b/indra/llappearance/llavatarappearance.h
@@ -139,6 +139,8 @@ public:
typedef std::map<std::string, LLJoint*> joint_map_t;
joint_map_t mJointMap;
+
+ S32 mNextJointNum;
void computeBodySize();
diff --git a/indra/llcharacter/lljoint.h b/indra/llcharacter/lljoint.h
index 2afdef1026..b2736f6c1e 100644
--- a/indra/llcharacter/lljoint.h
+++ b/indra/llcharacter/lljoint.h
@@ -40,9 +40,10 @@
#include "xform.h"
const S32 LL_CHARACTER_MAX_JOINTS_PER_MESH = 15;
-// Need to set this to count of animate-able joints (currently #bones +
-// #attachments) + 2, rounded to next multiple of 4.
-const U32 LL_CHARACTER_MAX_ANIMATED_JOINTS = 192; // must be divisible by 4!
+// Need to set this to count of animate-able joints,
+// currently = #bones + #collision_volumes + #attachments + 2,
+// rounded to next multiple of 4.
+const U32 LL_CHARACTER_MAX_ANIMATED_JOINTS = 216; // must be divisible by 4!
const U32 LL_MAX_JOINTS_PER_MESH_OBJECT = 110;
// These should be higher than the joint_num of any
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index b1282fb4de..6e436e85e9 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -5921,7 +5921,7 @@ void LLVOAvatar::initAttachmentPoints(bool ignore_hud_joints)
attachment->setVisibleInFirstPerson(info->mVisibleFirstPerson);
attachment->setIsHUDAttachment(info->mIsHUDAttachment);
// attachment can potentially be animated, needs a number.
- attachment->setJointNum(mSkeleton.size() + attachmentID - 1);
+ attachment->setJointNum(mNextJointNum++);
if (newly_created)
{