You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
745 B
C++
34 lines
745 B
C++
#include "creatureanimation.hpp"
|
|
|
|
#include "renderconst.hpp"
|
|
|
|
#include "../mwbase/world.hpp"
|
|
|
|
namespace MWRender
|
|
{
|
|
|
|
CreatureAnimation::~CreatureAnimation()
|
|
{
|
|
}
|
|
|
|
CreatureAnimation::CreatureAnimation(const MWWorld::Ptr &ptr)
|
|
: Animation(ptr, ptr.getRefData().getBaseNode())
|
|
{
|
|
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;
|
|
|
|
setObjectRoot(model, false);
|
|
setRenderProperties(mObjectRoot, RV_Actors, RQG_Main, RQG_Alpha);
|
|
|
|
if((ref->mBase->mFlags&ESM::Creature::Biped))
|
|
addAnimSource("meshes\\base_anim.nif");
|
|
addAnimSource(model);
|
|
}
|
|
}
|
|
|
|
}
|