|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
#include "../mwbase/environment.hpp"
|
|
|
|
|
#include "../mwmechanics/mechanicsmanagerimp.hpp"
|
|
|
|
|
#include "../mwmechanics/movement.hpp"
|
|
|
|
|
#include "../mwmechanics/npcstats.hpp"
|
|
|
|
|
#include "../mwrender/animation.hpp"
|
|
|
|
@ -20,21 +21,24 @@ DedicatedActor::~DedicatedActor()
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void DedicatedActor::update()
|
|
|
|
|
void DedicatedActor::update(float dt)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
move(dt);
|
|
|
|
|
setDrawState();
|
|
|
|
|
setMovementFlags();
|
|
|
|
|
setAnimation();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void DedicatedActor::move()
|
|
|
|
|
void DedicatedActor::move(float dt)
|
|
|
|
|
{
|
|
|
|
|
MWBase::World *world = MWBase::Environment::get().getWorld();
|
|
|
|
|
|
|
|
|
|
world->moveObject(ptr, position.pos[0], position.pos[1], position.pos[2]);
|
|
|
|
|
|
|
|
|
|
MWMechanics::Movement *move = &ptr.getClass().getMovementSettings(ptr);
|
|
|
|
|
move->mPosition[0] = direction.pos[0];
|
|
|
|
|
move->mPosition[1] = direction.pos[1];
|
|
|
|
|
move->mPosition[2] = direction.pos[2];
|
|
|
|
|
MWMechanics::Movement& move = ptr.getClass().getMovementSettings(ptr);
|
|
|
|
|
move.mPosition[0] = direction.pos[0];
|
|
|
|
|
move.mPosition[1] = direction.pos[1];
|
|
|
|
|
move.mPosition[2] = direction.pos[2];
|
|
|
|
|
|
|
|
|
|
world->rotateObject(ptr, position.rot[0], position.rot[1], position.rot[2]);
|
|
|
|
|
}
|
|
|
|
|