mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 07:49:56 +00:00
e4c5aac966
This only tracks layers they explicitly animate on. They may animate on other layers as well, if nothing else is animating on them.
32 lines
771 B
C++
32 lines
771 B
C++
#include "creatureanimation.hpp"
|
|
|
|
#include "renderconst.hpp"
|
|
|
|
#include "../mwbase/world.hpp"
|
|
|
|
namespace MWRender
|
|
{
|
|
|
|
CreatureAnimation::~CreatureAnimation()
|
|
{
|
|
}
|
|
|
|
CreatureAnimation::CreatureAnimation(const MWWorld::Ptr &ptr)
|
|
: Animation(ptr)
|
|
{
|
|
MWWorld::LiveCellRef<ESM::Creature> *ref = mPtr.get<ESM::Creature>();
|
|
|
|
assert (ref->mBase != NULL);
|
|
if(!ref->mBase->mModel.empty())
|
|
{
|
|
std::string model = "meshes\\"+ref->mBase->mModel;
|
|
|
|
if((ref->mBase->mFlags&ESM::Creature::Biped))
|
|
addObjectList(mPtr.getRefData().getBaseNode(), "meshes\\base_anim.nif", true);
|
|
|
|
addObjectList(mPtr.getRefData().getBaseNode(), model, false);
|
|
setRenderProperties(mObjects.back().mObjectList, RV_Actors, RQG_Main, RQG_Alpha);
|
|
}
|
|
}
|
|
|
|
}
|