2013-01-16 22:37:32 +00:00
|
|
|
#include "activatoranimation.hpp"
|
|
|
|
|
2014-02-23 19:11:05 +00:00
|
|
|
#include <components/esm/loadacti.hpp>
|
2013-01-16 22:37:32 +00:00
|
|
|
|
|
|
|
#include "../mwbase/world.hpp"
|
|
|
|
|
2014-02-23 19:11:05 +00:00
|
|
|
#include "renderconst.hpp"
|
|
|
|
|
2013-01-16 22:37:32 +00:00
|
|
|
namespace MWRender
|
|
|
|
{
|
|
|
|
|
|
|
|
ActivatorAnimation::~ActivatorAnimation()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
ActivatorAnimation::ActivatorAnimation(const MWWorld::Ptr &ptr)
|
2013-08-06 08:41:47 +00:00
|
|
|
: Animation(ptr, ptr.getRefData().getBaseNode())
|
2013-01-16 22:37:32 +00:00
|
|
|
{
|
|
|
|
MWWorld::LiveCellRef<ESM::Activator> *ref = mPtr.get<ESM::Activator>();
|
|
|
|
|
2013-08-06 08:41:47 +00:00
|
|
|
assert(ref->mBase != NULL);
|
2013-01-16 22:37:32 +00:00
|
|
|
if(!ref->mBase->mModel.empty())
|
|
|
|
{
|
2013-04-16 01:55:28 +00:00
|
|
|
const std::string name = "meshes\\"+ref->mBase->mModel;
|
2013-01-16 22:37:32 +00:00
|
|
|
|
2013-08-06 08:41:47 +00:00
|
|
|
setObjectRoot(name, false);
|
2013-05-07 06:11:26 +00:00
|
|
|
setRenderProperties(mObjectRoot, RV_Misc, RQG_Main, RQG_Alpha);
|
2013-05-07 23:59:32 +00:00
|
|
|
|
|
|
|
addAnimSource(name);
|
2013-01-16 22:37:32 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|