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.
openmw-tes3mp/apps/openmw/mwrender/activatoranimation.cpp

34 lines
686 B
C++

#include "activatoranimation.hpp"
#include <components/esm/loadacti.hpp>
#include "../mwbase/world.hpp"
#include "renderconst.hpp"
namespace MWRender
{
ActivatorAnimation::~ActivatorAnimation()
{
}
ActivatorAnimation::ActivatorAnimation(const MWWorld::Ptr &ptr)
: Animation(ptr, ptr.getRefData().getBaseNode())
{
MWWorld::LiveCellRef<ESM::Activator> *ref = mPtr.get<ESM::Activator>();
assert(ref->mBase != NULL);
if(!ref->mBase->mModel.empty())
{
const std::string name = "meshes\\"+ref->mBase->mModel;
setObjectRoot(name, false);
setRenderProperties(mObjectRoot, RV_Misc, RQG_Main, RQG_Alpha);
addAnimSource(name);
}
}
}