1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 15:35:23 +00:00
OpenMW/apps/openmw/mwrender/creatureanimation.cpp

34 lines
746 B
C++
Raw Normal View History

#include "creatureanimation.hpp"
2012-04-03 15:13:47 +02:00
#include "renderconst.hpp"
#include "../mwbase/world.hpp"
namespace MWRender
{
2011-12-11 23:42:39 -05:00
CreatureAnimation::~CreatureAnimation()
{
2011-12-11 23:42:39 -05:00
}
CreatureAnimation::CreatureAnimation(const MWWorld::Ptr &ptr)
: Animation(ptr)
{
MWWorld::LiveCellRef<ESM::Creature> *ref = mPtr.get<ESM::Creature>();
2012-11-05 16:07:59 +04:00
assert (ref->mBase != NULL);
if(!ref->mBase->mModel.empty())
{
2013-02-23 03:34:03 -08:00
std::string model = "meshes\\"+ref->mBase->mModel;
setObjectRoot(mPtr.getRefData().getBaseNode(), model, false);
setRenderProperties(mObjectRoot, RV_Actors, RQG_Main, RQG_Alpha);
if((ref->mBase->mFlags&ESM::Creature::Biped))
addAnimSource("meshes\\base_anim.nif");
addAnimSource(model);
}
}
2012-01-17 15:10:53 +01:00
}