2017-04-08 05:59:21 +00:00
|
|
|
#include <components/openmw-mp/Log.hpp>
|
|
|
|
|
2017-04-06 12:11:51 +00:00
|
|
|
#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
|
|
|
|
2017-04-05 09:52:27 +00:00
|
|
|
#include "LocalActor.hpp"
|
|
|
|
|
|
|
|
using namespace mwmp;
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
LocalActor::LocalActor()
|
|
|
|
{
|
2017-04-06 12:11:51 +00:00
|
|
|
headPitch = -1;
|
|
|
|
headYaw = -1;
|
2017-04-08 05:59:21 +00:00
|
|
|
hasAnimation = false;
|
|
|
|
hasAnimStates = false;
|
|
|
|
hasMovement = false;
|
2017-04-05 09:52:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
LocalActor::~LocalActor()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void LocalActor::update()
|
|
|
|
{
|
2017-04-06 12:11:51 +00:00
|
|
|
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;
|
|
|
|
}
|