1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-09 03:39:14 +00:00
OpenMW/apps/openmw/mwmechanics/aiface.hpp

28 lines
747 B
C++
Raw Normal View History

#ifndef GAME_MWMECHANICS_AIFACE_H
#define GAME_MWMECHANICS_AIFACE_H
#include "typedaipackage.hpp"
namespace MWMechanics
{
/// AiPackage which makes an actor face a certain direction.
class AiFace final : public TypedAiPackage<AiFace> {
public:
AiFace(float targetX, float targetY);
bool execute (const MWWorld::Ptr& actor, CharacterController& characterController, AiState& state, float duration) final;
int getTypeId() const final;
unsigned int getPriority() const final;
bool canCancel() const final { return false; }
bool shouldCancelPreviousAi() const final { return false; }
private:
float mTargetX, mTargetY;
};
}
#endif