1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 23:49:55 +00:00
openmw-tes3mp/apps/openmw/mwmechanics/aipursue.hpp
scrawl 2e9985c1a3 Change all AI packages (except AiActivate) to use ActorIds
More robust in case the target changes cell or there are multiple targets with the same RefId
2014-05-15 09:54:10 +02:00

31 lines
978 B
C++

#ifndef GAME_MWMECHANICS_AIPURSUE_H
#define GAME_MWMECHANICS_AIPURSUE_H
#include "aipackage.hpp"
#include <string>
#include "pathfinding.hpp"
namespace MWMechanics
{
/// \brief Makes the actor very closely follow the actor
/** Used for arresting players. Causes the actor to run to the pursued actor and activate them, to arrest them.
Note that while very similar to AiActivate, it will ONLY activate when evry close to target (Not also when the
path is completed). **/
class AiPursue : public AiPackage
{
public:
///Constructor
/** \param actor Actor to pursue **/
AiPursue(const MWWorld::Ptr& actor);
virtual AiPursue *clone() const;
virtual bool execute (const MWWorld::Ptr& actor,float duration);
virtual int getTypeId() const;
private:
int mActorId; // The actor to pursue
int mCellX;
int mCellY;
};
}
#endif