forked from mirror/openmw-tes3mp
Update part skeletons immediately when added
This commit is contained in:
parent
dc0360b1f6
commit
4641737fc4
1 changed files with 16 additions and 11 deletions
|
@ -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…
Reference in a new issue