mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-28 14:39:41 +00:00
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;
|
mPartPriorities[type] = priority;
|
||||||
|
|
||||||
mObjectParts[type] = insertBoundedPart(mesh, group, sPartList.at(type));
|
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::Node *root = mObjectParts[type].mSkelBase->getParentNode();
|
||||||
Ogre::SkeletonInstance *skel = mObjectParts[type].mSkelBase->getSkeleton();
|
|
||||||
if(skel->hasBone("BoneOffset"))
|
if(skel->hasBone("BoneOffset"))
|
||||||
{
|
{
|
||||||
Ogre::Bone *offset = skel->getBone("BoneOffset");
|
Ogre::Bone *offset = skel->getBone("BoneOffset");
|
||||||
|
@ -509,6 +511,9 @@ bool NpcAnimation::addOrReplaceIndividualPart(ESM::PartReferenceType type, int g
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateSkeletonInstance(mSkelBase->getSkeleton(), skel);
|
||||||
|
}
|
||||||
|
|
||||||
// TODO:
|
// TODO:
|
||||||
// type == ESM::PRT_Head should get an animation source based on the current output of
|
// type == ESM::PRT_Head should get an animation source based on the current output of
|
||||||
// the actor's 'say' sound (0 = silent, 1 = loud?).
|
// the actor's 'say' sound (0 = silent, 1 = loud?).
|
||||||
|
|
Loading…
Reference in a new issue