|
|
|
@ -60,6 +60,21 @@ std::string getVampireHead(const std::string& race, bool female)
|
|
|
|
|
return "meshes\\" + sVampireMapping[thisCombination]->mModel;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool isSkinned (NifOgre::ObjectScenePtr scene)
|
|
|
|
|
{
|
|
|
|
|
if (scene->mSkelBase == NULL)
|
|
|
|
|
return false;
|
|
|
|
|
for(size_t j = 0; j < scene->mEntities.size(); j++)
|
|
|
|
|
{
|
|
|
|
|
Ogre::Entity *ent = scene->mEntities[j];
|
|
|
|
|
if(scene->mSkelBase != ent && ent->hasSkeleton())
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -611,10 +626,11 @@ Ogre::Vector3 NpcAnimation::runAnimation(float timepassed)
|
|
|
|
|
for(;ctrl != mObjectParts[i]->mControllers.end();++ctrl)
|
|
|
|
|
ctrl->update();
|
|
|
|
|
|
|
|
|
|
Ogre::Entity *ent = mObjectParts[i]->mSkelBase;
|
|
|
|
|
if(!ent) continue;
|
|
|
|
|
updateSkeletonInstance(baseinst, ent->getSkeleton());
|
|
|
|
|
ent->getAllAnimationStates()->_notifyDirty();
|
|
|
|
|
if (!isSkinned(mObjectParts[i]))
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
updateSkeletonInstance(baseinst, mObjectParts[i]->mSkelBase->getSkeleton());
|
|
|
|
|
mObjectParts[i]->mSkelBase->getAllAnimationStates()->_notifyDirty();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
@ -697,7 +713,8 @@ bool NpcAnimation::addOrReplaceIndividualPart(ESM::PartReferenceType type, int g
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
updateSkeletonInstance(mSkelBase->getSkeleton(), skel);
|
|
|
|
|
if (isSkinned(mObjectParts[type]))
|
|
|
|
|
updateSkeletonInstance(mSkelBase->getSkeleton(), skel);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
std::vector<Ogre::Controller<Ogre::Real> >::iterator ctrl(mObjectParts[type]->mControllers.begin());
|
|
|
|
|