openmw-tes3coop/apps/openmw/mwrender/creatureanimation.cpp
Chris Robinson e85bc8b2cd Only load one Nif for Animation objects
This breaks quite a bit, but it's needed for the transition to using the
.kf files.
2013-05-06 23:11:26 -07:00

29 lines
609 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;
setObjectRoot(mPtr.getRefData().getBaseNode(), model, false);
setRenderProperties(mObjectRoot, RV_Actors, RQG_Main, RQG_Alpha);
}
}
}