1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 13:19:54 +00:00
openmw-tes3mp/apps/openmw/mwrender/creatureanimation.cpp
Chris Robinson e4c5aac966 Keep track of the animation layers a given object list is animating on
This only tracks layers they explicitly animate on. They may animate on other
layers as well, if nothing else is animating on them.
2013-04-23 02:48:11 -07:00

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);
}
}
}