2014-12-21 15:45:30 +00:00
|
|
|
#include "actor.hpp"
|
|
|
|
|
2015-04-25 13:19:17 +00:00
|
|
|
#include "character.hpp"
|
2014-12-21 15:45:30 +00:00
|
|
|
|
|
|
|
namespace MWMechanics
|
|
|
|
{
|
|
|
|
|
|
|
|
Actor::Actor(const MWWorld::Ptr &ptr, MWRender::Animation *animation)
|
|
|
|
{
|
2015-04-25 13:19:17 +00:00
|
|
|
mCharacterController.reset(new CharacterController(ptr, animation));
|
2014-12-21 15:45:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void Actor::updatePtr(const MWWorld::Ptr &newPtr)
|
|
|
|
{
|
2015-04-25 13:19:17 +00:00
|
|
|
mCharacterController->updatePtr(newPtr);
|
2014-12-21 15:45:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
CharacterController* Actor::getCharacterController()
|
|
|
|
{
|
2015-04-25 13:19:17 +00:00
|
|
|
return mCharacterController.get();
|
2014-12-21 15:45:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
AiState& Actor::getAiState()
|
|
|
|
{
|
|
|
|
return mAiState;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|