mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 04:49:54 +00:00
53 lines
905 B
C++
53 lines
905 B
C++
#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"
|
|
|
|
#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();
|
|
}
|
|
|
|
MWWorld::Ptr LocalActor::getPtr()
|
|
{
|
|
return ptr;
|
|
}
|
|
|
|
void LocalActor::setPtr(const MWWorld::Ptr& newPtr)
|
|
{
|
|
ptr = newPtr;
|
|
}
|