1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 10:19:55 +00:00
openmw-tes3mp/apps/openmw/mwrender/creatureanimation.cpp

33 lines
771 B
C++
Raw Normal View History

#include "creatureanimation.hpp"
2012-04-03 13:13:47 +00:00
#include "renderconst.hpp"
#include "../mwbase/world.hpp"
namespace MWRender
{
2011-12-12 04:42:39 +00:00
CreatureAnimation::~CreatureAnimation()
{
2011-12-12 04:42:39 +00:00
}
CreatureAnimation::CreatureAnimation(const MWWorld::Ptr &ptr)
: Animation(ptr)
{
MWWorld::LiveCellRef<ESM::Creature> *ref = mPtr.get<ESM::Creature>();
2012-11-05 12:07:59 +00:00
assert (ref->mBase != NULL);
if(!ref->mBase->mModel.empty())
{
2013-02-23 11:34:03 +00:00
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);
}
}
2012-01-17 14:10:53 +00:00
}