1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-20 06:23:52 +00:00
openmw-tes3mp/apps/openmw/mwmp/LocalActor.cpp

54 lines
905 B
C++
Raw Normal View History

#include <components/openmw-mp/Log.hpp>
#include "../mwbase/environment.hpp"
#include "../mwmechanics/movement.hpp"
#include "../mwmechanics/npcstats.hpp"
#include "../mwrender/animation.hpp"
#include "../mwworld/class.hpp"
#include "../mwworld/worldimp.hpp"
2017-04-06 01:00:50 +00:00
#include "LocalActor.hpp"
using namespace mwmp;
using namespace std;
LocalActor::LocalActor()
{
headPitch = -1;
headYaw = -1;
hasAnimation = false;
hasAnimStates = false;
hasMovement = false;
}
LocalActor::~LocalActor()
{
}
void LocalActor::update()
{
updatePosition();
updateDrawState();
}
void LocalActor::updatePosition()
{
position = ptr.getRefData().getPosition();
}
void LocalActor::updateDrawState()
{
drawState = ptr.getClass().getNpcStats(ptr).getDrawState();
}
2017-04-06 01:00:50 +00:00
MWWorld::Ptr LocalActor::getPtr()
{
return ptr;
}
void LocalActor::setPtr(const MWWorld::Ptr& newPtr)
{
ptr = newPtr;
}