mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-27 15:11:36 -04:00
Update part skeletons immediately when added
This commit is contained in:
parent
dc0360b1f6
commit
4641737fc4
@ -493,10 +493,12 @@ bool NpcAnimation::addOrReplaceIndividualPart(ESM::PartReferenceType type, int g
|
||||
mPartPriorities[type] = priority;
|
||||
|
||||
mObjectParts[type] = insertBoundedPart(mesh, group, sPartList.at(type));
|
||||
if(mObjectParts[type].mSkelBase && mObjectParts[type].mSkelBase->isParentTagPoint())
|
||||
if(mObjectParts[type].mSkelBase)
|
||||
{
|
||||
Ogre::SkeletonInstance *skel = mObjectParts[type].mSkelBase->getSkeleton();
|
||||
if(mObjectParts[type].mSkelBase->isParentTagPoint())
|
||||
{
|
||||
Ogre::Node *root = mObjectParts[type].mSkelBase->getParentNode();
|
||||
Ogre::SkeletonInstance *skel = mObjectParts[type].mSkelBase->getSkeleton();
|
||||
if(skel->hasBone("BoneOffset"))
|
||||
{
|
||||
Ogre::Bone *offset = skel->getBone("BoneOffset");
|
||||
@ -509,6 +511,9 @@ bool NpcAnimation::addOrReplaceIndividualPart(ESM::PartReferenceType type, int g
|
||||
}
|
||||
}
|
||||
|
||||
updateSkeletonInstance(mSkelBase->getSkeleton(), skel);
|
||||
}
|
||||
|
||||
// TODO:
|
||||
// type == ESM::PRT_Head should get an animation source based on the current output of
|
||||
// the actor's 'say' sound (0 = silent, 1 = loud?).
|
||||
|
Loading…
x
Reference in New Issue
Block a user