|
|
|
@ -336,6 +336,9 @@ void NpcAnimation::updateNpcBase()
|
|
|
|
|
|
|
|
|
|
void NpcAnimation::updateParts()
|
|
|
|
|
{
|
|
|
|
|
if (!mSkelBase)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
mAlpha = 1.f;
|
|
|
|
|
const MWWorld::Class &cls = mPtr.getClass();
|
|
|
|
|
|
|
|
|
@ -626,6 +629,8 @@ Ogre::Vector3 NpcAnimation::runAnimation(float timepassed)
|
|
|
|
|
|
|
|
|
|
mHeadAnimationTime->update(timepassed);
|
|
|
|
|
|
|
|
|
|
if (mSkelBase)
|
|
|
|
|
{
|
|
|
|
|
Ogre::SkeletonInstance *baseinst = mSkelBase->getSkeleton();
|
|
|
|
|
if(mViewMode == VM_FirstPerson)
|
|
|
|
|
{
|
|
|
|
@ -646,6 +651,7 @@ Ogre::Vector3 NpcAnimation::runAnimation(float timepassed)
|
|
|
|
|
if (node)
|
|
|
|
|
node->rotate(Ogre::Quaternion(mHeadYaw, Ogre::Vector3::UNIT_Z) * Ogre::Quaternion(mHeadPitch, Ogre::Vector3::UNIT_X), Ogre::Node::TS_WORLD);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
mFirstPersonOffset = 0.f; // reset the X, Y, Z offset for the next frame.
|
|
|
|
|
|
|
|
|
|
for(size_t i = 0;i < ESM::PRT_Count;i++)
|
|
|
|
@ -659,7 +665,9 @@ Ogre::Vector3 NpcAnimation::runAnimation(float timepassed)
|
|
|
|
|
if (!isSkinned(mObjectParts[i]))
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
updateSkeletonInstance(baseinst, mObjectParts[i]->mSkelBase->getSkeleton());
|
|
|
|
|
if (mSkelBase)
|
|
|
|
|
updateSkeletonInstance(mSkelBase->getSkeleton(), mObjectParts[i]->mSkelBase->getSkeleton());
|
|
|
|
|
|
|
|
|
|
mObjectParts[i]->mSkelBase->getAllAnimationStates()->_notifyDirty();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|