forked from teamnwah/openmw-tes3coop
Add case sensitivity workaround for spine bones (Fixes #1547)
This commit is contained in:
parent
a4ce9d6a7f
commit
98329a94b4
1 changed files with 12 additions and 2 deletions
|
@ -150,9 +150,19 @@ void WeaponAnimation::pitchSkeleton(float xrot, Ogre::SkeletonInstance* skel)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
float pitch = xrot * mPitchFactor;
|
float pitch = xrot * mPitchFactor;
|
||||||
Ogre::Node *node = skel->getBone("Bip01 Spine2");
|
Ogre::Node *node;
|
||||||
|
|
||||||
|
// In spherearcher.nif, we have spine, not Spine. Not sure if all bone names should be case insensitive?
|
||||||
|
if (skel->hasBone("Bip01 spine2"))
|
||||||
|
node = skel->getBone("Bip01 spine2");
|
||||||
|
else
|
||||||
|
node = skel->getBone("Bip01 Spine2");
|
||||||
node->pitch(Ogre::Radian(-pitch/2), Ogre::Node::TS_WORLD);
|
node->pitch(Ogre::Radian(-pitch/2), Ogre::Node::TS_WORLD);
|
||||||
node = skel->getBone("Bip01 Spine1");
|
|
||||||
|
if (skel->hasBone("Bip01 spine1")) // in spherearcher.nif
|
||||||
|
node = skel->getBone("Bip01 spine1");
|
||||||
|
else
|
||||||
|
node = skel->getBone("Bip01 Spine1");
|
||||||
node->pitch(Ogre::Radian(-pitch/2), Ogre::Node::TS_WORLD);
|
node->pitch(Ogre::Radian(-pitch/2), Ogre::Node::TS_WORLD);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue