1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-27 12:35:46 +00:00
OpenMW/apps/openmw/mwmechanics/aitravel.hpp

49 lines
1.3 KiB
C++
Raw Normal View History

2012-11-15 22:15:20 +01:00
#ifndef GAME_MWMECHANICS_AITRAVEL_H
#define GAME_MWMECHANICS_AITRAVEL_H
2013-03-26 18:01:01 +01:00
#include "typedaipackage.hpp"
2014-06-12 23:27:04 +02:00
namespace ESM
{
namespace AiSequence
{
struct AiTravel;
}
}
2013-03-26 18:01:01 +01:00
namespace MWMechanics
2014-06-12 23:27:04 +02:00
{
/// \brief Causes the AI to travel to the specified point
class AiTravel final : public TypedAiPackage<AiTravel>
2013-03-26 18:01:01 +01:00
{
2014-06-12 23:27:04 +02:00
public:
/// Default constructor
2017-12-01 19:58:42 +04:00
AiTravel(float x, float y, float z, bool hidden = false);
2014-06-12 23:27:04 +02:00
AiTravel(const ESM::AiSequence::AiTravel* travel);
/// Simulates the passing of time
void fastForward(const MWWorld::Ptr& actor, AiState& state) final;
void writeState(ESM::AiSequence::AiSequence &sequence) const final;
2014-06-12 23:27:04 +02:00
bool execute (const MWWorld::Ptr& actor, CharacterController& characterController, AiState& state, float duration) final;
2013-03-26 18:01:01 +01:00
int getTypeId() const final;
2013-03-26 18:01:01 +01:00
bool useVariableSpeed() const final { return true; }
bool alwaysActive() const final { return true; }
osg::Vec3f getDestination() const final { return osg::Vec3f(mX, mY, mZ); }
2013-03-26 18:01:01 +01:00
private:
float mX;
float mY;
float mZ;
2017-12-01 19:58:42 +04:00
bool mHidden;
2013-03-26 18:01:01 +01:00
};
2012-11-14 18:42:04 +01:00
}
2012-11-15 22:15:20 +01:00
#endif