1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 22:53:50 +00:00

Fix rotation offset of some lights (bug 955)

This commit is contained in:
scrawl 2013-11-23 05:55:03 +01:00
parent 39de0510a0
commit a1fe07181c

View file

@ -540,10 +540,13 @@ bool NpcAnimation::addOrReplaceIndividualPart(ESM::PartReferenceType type, int g
if(skel->hasBone("BoneOffset")) if(skel->hasBone("BoneOffset"))
{ {
Ogre::Bone *offset = skel->getBone("BoneOffset"); Ogre::Bone *offset = skel->getBone("BoneOffset");
root->translate(offset->getPosition()); root->translate(offset->getPosition());
root->rotate(offset->getOrientation());
// HACK: Why an extra -90 degree rotation? // It appears that the BoneOffset rotation is completely bogus, at least for light models.
//root->rotate(offset->getOrientation());
root->pitch(Ogre::Degree(-90.0f)); root->pitch(Ogre::Degree(-90.0f));
root->scale(offset->getScale()); root->scale(offset->getScale());
root->setInitialState(); root->setInitialState();
} }