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