mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 13:49:55 +00:00
31 lines
646 B
C++
31 lines
646 B
C++
#include "activatoranimation.hpp"
|
|
|
|
#include "renderconst.hpp"
|
|
|
|
#include "../mwbase/world.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);
|
|
}
|
|
}
|
|
|
|
}
|