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 "aipackage.hpp"
|
2013-05-25 01:16:35 +00:00
|
|
|
|
2013-03-31 17:30:03 +00:00
|
|
|
#include "pathfinding.hpp"
|
2013-03-26 17:01:01 +00:00
|
|
|
|
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
|
|
|
{
|
2014-04-30 03:40:59 +00:00
|
|
|
/// \brief Causes the AI to travel to the specified point
|
2013-03-26 17:01:01 +00:00
|
|
|
class AiTravel : public AiPackage
|
|
|
|
{
|
2014-06-12 21:27:04 +00:00
|
|
|
public:
|
2014-04-30 03:40:59 +00:00
|
|
|
/// Default constructor
|
2013-03-26 17:01:01 +00:00
|
|
|
AiTravel(float x, float y, float z);
|
2014-06-12 21:27:04 +00:00
|
|
|
AiTravel(const ESM::AiSequence::AiTravel* travel);
|
|
|
|
|
|
|
|
void writeState(ESM::AiSequence::AiSequence &sequence) const;
|
|
|
|
|
2013-03-26 17:01:01 +00:00
|
|
|
virtual AiTravel *clone() const;
|
|
|
|
|
2013-10-30 19:42:50 +00:00
|
|
|
virtual bool execute (const MWWorld::Ptr& actor,float duration);
|
2013-03-26 17:01:01 +00:00
|
|
|
|
|
|
|
virtual int getTypeId() const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
float mX;
|
|
|
|
float mY;
|
|
|
|
float mZ;
|
|
|
|
|
2014-02-05 15:12:50 +00:00
|
|
|
int mCellX;
|
|
|
|
int mCellY;
|
2013-03-26 17:01:01 +00:00
|
|
|
|
2013-03-31 17:30:03 +00:00
|
|
|
PathFinder mPathFinder;
|
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
|