1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 16:19:56 +00:00
openmw-tes3mp/apps/openmw/mwrender/activatoranimation.cpp

33 lines
598 B
C++
Raw Normal View History

#include "activatoranimation.hpp"
2014-02-23 19:11:05 +00:00
#include <components/esm/loadacti.hpp>
#include "../mwbase/world.hpp"
2014-12-05 19:58:33 +00:00
#include "../mwworld/class.hpp"
2014-02-23 19:11:05 +00:00
#include "renderconst.hpp"
namespace MWRender
{
ActivatorAnimation::~ActivatorAnimation()
{
}
ActivatorAnimation::ActivatorAnimation(const MWWorld::Ptr &ptr)
: Animation(ptr, ptr.getRefData().getBaseNode())
{
2014-12-05 19:58:33 +00:00
const std::string& model = mPtr.getClass().getModel(mPtr);
2014-12-05 19:58:33 +00:00
if(!model.empty())
{
2014-12-05 19:58:33 +00:00
setObjectRoot(model, false);
setRenderProperties(mObjectRoot, RV_Misc, RQG_Main, RQG_Alpha);
2014-12-05 19:58:33 +00:00
addAnimSource(model);
}
}
}