2016-07-09 00:16:47 +00:00
|
|
|
#ifndef GAME_MWMECHANICS_AIFACE_H
|
|
|
|
#define GAME_MWMECHANICS_AIFACE_H
|
|
|
|
|
2020-05-17 20:10:36 +00:00
|
|
|
#include "typedaipackage.hpp"
|
2016-07-09 00:16:47 +00:00
|
|
|
|
|
|
|
namespace MWMechanics
|
|
|
|
{
|
|
|
|
/// AiPackage which makes an actor face a certain direction.
|
2020-05-17 20:10:36 +00:00
|
|
|
class AiFace final : public TypedAiPackage<AiFace> {
|
2016-07-09 00:16:47 +00:00
|
|
|
public:
|
|
|
|
AiFace(float targetX, float targetY);
|
|
|
|
|
2020-05-16 16:56:02 +00:00
|
|
|
bool execute (const MWWorld::Ptr& actor, CharacterController& characterController, AiState& state, float duration) final;
|
2016-07-09 00:16:47 +00:00
|
|
|
|
2020-05-16 16:56:02 +00:00
|
|
|
int getTypeId() const final;
|
2016-07-09 00:16:47 +00:00
|
|
|
|
2020-05-16 16:56:02 +00:00
|
|
|
unsigned int getPriority() const final;
|
2016-07-09 00:16:47 +00:00
|
|
|
|
2020-05-16 16:56:02 +00:00
|
|
|
bool canCancel() const final { return false; }
|
|
|
|
bool shouldCancelPreviousAi() const final { return false; }
|
2016-07-09 00:16:47 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
float mTargetX, mTargetY;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|