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

Merge pull request #2865 from Capostrophic/headtracking

Re-enable non-biped creature headtracking (bug #5424)
This commit is contained in:
Andrei Kortunov 2020-05-22 16:19:38 +04:00 committed by GitHub
commit 2618974ad6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 23 deletions

View file

@ -16,6 +16,7 @@
Bug #5400: Editor: Verifier checks race of non-skin bodyparts Bug #5400: Editor: Verifier checks race of non-skin bodyparts
Bug #5415: Environment maps in ebony cuirass and HiRez Armors Indoril cuirass don't work Bug #5415: Environment maps in ebony cuirass and HiRez Armors Indoril cuirass don't work
Bug #5416: Junk non-node records before the root node are not handled gracefully Bug #5416: Junk non-node records before the root node are not handled gracefully
Bug #5424: Creatures do not headtrack player
Feature #5362: Show the soul gems' trapped soul in count dialog Feature #5362: Show the soul gems' trapped soul in count dialog
0.46.0 0.46.0

View file

@ -1815,11 +1815,10 @@ namespace MWRender
{ {
mHeadController = nullptr; mHeadController = nullptr;
if (mPtr.getClass().isBipedal(mPtr))
{
NodeMap::const_iterator found = getNodeMap().find("bip01 head"); NodeMap::const_iterator found = getNodeMap().find("bip01 head");
if (found != getNodeMap().end()) if (found == getNodeMap().end())
{ return;
osg::MatrixTransform* node = found->second; osg::MatrixTransform* node = found->second;
bool foundKeyframeCtrl = false; bool foundKeyframeCtrl = false;
@ -1834,15 +1833,13 @@ namespace MWRender
cb = cb->getNestedCallback(); cb = cb->getNestedCallback();
} }
if (foundKeyframeCtrl) if (!foundKeyframeCtrl)
{ return;
mHeadController = new RotateController(mObjectRoot.get()); mHeadController = new RotateController(mObjectRoot.get());
node->addUpdateCallback(mHeadController); node->addUpdateCallback(mHeadController);
mActiveControllers.emplace_back(node, mHeadController); mActiveControllers.emplace_back(node, mHeadController);
} }
}
}
}
void Animation::setHeadPitch(float pitchRadians) void Animation::setHeadPitch(float pitchRadians)
{ {