#3870 Added joint initialization for LLVOAvatarSelf
Sometimes mesh thread crashes when allocating jointsmaster
parent
9b531e01eb
commit
af9254e3e3
|
|
@ -4702,6 +4702,7 @@ void LLMeshRepository::notifyLoadedMeshes()
|
|||
|
||||
if (mPendingRequests.size() > push_count)
|
||||
{
|
||||
LL_PROFILE_ZONE_NAMED("Mesh score_map");
|
||||
// More requests than the high-water limit allows so
|
||||
// sort and forward the most important.
|
||||
|
||||
|
|
|
|||
|
|
@ -7370,6 +7370,16 @@ LLJoint *LLVOAvatar::getJoint( S32 joint_num )
|
|||
return pJoint;
|
||||
}
|
||||
|
||||
void LLVOAvatar::initAllJoints()
|
||||
{
|
||||
getJointAliases();
|
||||
for (auto& alias : mJointAliasMap)
|
||||
{
|
||||
mJointMap[alias.first] = mRoot->findJoint(alias.second);
|
||||
}
|
||||
// ignore mScreen and mRoot
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// getRiggedMeshID
|
||||
//
|
||||
|
|
|
|||
|
|
@ -210,6 +210,7 @@ public:
|
|||
LLJoint* getJoint( const std::string &name ) { return getJoint( JointKey::construct( name ) ); }
|
||||
// </FS:ND>
|
||||
LLJoint* getJoint(S32 num);
|
||||
void initAllJoints();
|
||||
|
||||
//if you KNOW joint_num is a valid animated joint index, use getSkeletonJoint for efficiency
|
||||
inline LLJoint* getSkeletonJoint(S32 joint_num) { return mSkeleton[joint_num]; }
|
||||
|
|
|
|||
|
|
@ -272,6 +272,8 @@ void LLVOAvatarSelf::initInstance()
|
|||
doPeriodically(check_for_unsupported_baked_appearance, 120.0);
|
||||
doPeriodically(boost::bind(&LLVOAvatarSelf::checkStuckAppearance, this), 30.0);
|
||||
|
||||
initAllJoints(); // mesh thread uses LLVOAvatarSelf as a joint source
|
||||
|
||||
mInitFlags |= 1<<2;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue