mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-09 12:42:11 +00:00
e4c5aac966
This only tracks layers they explicitly animate on. They may animate on other layers as well, if nothing else is animating on them.
30 lines
634 B
C++
30 lines
634 B
C++
#include "activatoranimation.hpp"
|
|
|
|
#include "renderconst.hpp"
|
|
|
|
#include "../mwbase/world.hpp"
|
|
|
|
namespace MWRender
|
|
{
|
|
|
|
ActivatorAnimation::~ActivatorAnimation()
|
|
{
|
|
}
|
|
|
|
ActivatorAnimation::ActivatorAnimation(const MWWorld::Ptr &ptr)
|
|
: Animation(ptr)
|
|
{
|
|
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;
|
|
|
|
addObjectList(mPtr.getRefData().getBaseNode(), name, false);
|
|
setRenderProperties(mObjects.back().mObjectList, RV_Misc, RQG_Main, RQG_Alpha);
|
|
}
|
|
}
|
|
|
|
}
|