1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-21 11:23:51 +00:00
openmw-tes3mp/apps/openmw/mwmechanics/aitravel.hpp

49 lines
1.3 KiB
C++
Raw Normal View History

2012-11-15 21:15:20 +00:00
#ifndef GAME_MWMECHANICS_AITRAVEL_H
#define GAME_MWMECHANICS_AITRAVEL_H
2013-03-26 17:01:01 +00:00
#include "typedaipackage.hpp"
2014-06-12 21:27:04 +00:00
namespace ESM
{
namespace AiSequence
{
struct AiTravel;
}
}
2013-03-26 17:01:01 +00:00
namespace MWMechanics
2014-06-12 21:27:04 +00:00
{
/// \brief Causes the AI to travel to the specified point
class AiTravel final : public TypedAiPackage<AiTravel>
2013-03-26 17:01:01 +00:00
{
2014-06-12 21:27:04 +00:00
public:
/// Default constructor
2017-12-01 15:58:42 +00:00
AiTravel(float x, float y, float z, bool hidden = false);
2014-06-12 21:27:04 +00: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 21:27:04 +00:00
bool execute (const MWWorld::Ptr& actor, CharacterController& characterController, AiState& state, float duration) final;
2013-03-26 17:01:01 +00:00
int getTypeId() const final;
2013-03-26 17:01:01 +00: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 17:01:01 +00:00
private:
const float mX;
const float mY;
const float mZ;
2017-12-01 15:58:42 +00:00
const bool mHidden;
2013-03-26 17:01:01 +00:00
};
2012-11-14 17:42:04 +00:00
}
2012-11-15 21:15:20 +00:00
#endif