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-12-05 20:58:33 +01:00
|
|
|
#include "../mwworld/class.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
|
|
|
{
|
2014-12-05 20:58:33 +01:00
|
|
|
const std::string& model = mPtr.getClass().getModel(mPtr);
|
2013-01-16 14:37:32 -08:00
|
|
|
|
2014-12-05 20:58:33 +01:00
|
|
|
if(!model.empty())
|
2013-01-16 14:37:32 -08:00
|
|
|
{
|
2014-12-05 20:58:33 +01:00
|
|
|
setObjectRoot(model, 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
|
|
|
|
2014-12-05 20:58:33 +01:00
|
|
|
addAnimSource(model);
|
2013-01-16 14:37:32 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|