1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-11 09:36:37 +00:00
OpenMW/apps/openmw/mwmechanics/aicombat.hpp

68 lines
1.3 KiB
C++
Raw Normal View History

2013-09-25 16:01:36 +00:00
#ifndef GAME_MWMECHANICS_AICOMBAT_H
#define GAME_MWMECHANICS_AICOMBAT_H
#include "aipackage.hpp"
#include "pathfinding.hpp"
#include "movement.hpp"
#include "obstacle.hpp"
#include <OgreVector3.h>
#include "../mwworld/cellstore.hpp" // for Doors
2013-09-25 16:01:36 +00:00
2014-01-15 20:56:55 +00:00
#include "../mwbase/world.hpp"
#include <boost/shared_ptr.hpp>
2014-06-12 21:27:04 +00:00
namespace ESM
{
namespace AiSequence
{
struct AiCombat;
}
}
2013-09-25 16:01:36 +00:00
namespace MWMechanics
{
class Action;
/// \brief Causes the actor to fight another actor
2013-09-25 16:01:36 +00:00
class AiCombat : public AiPackage
{
public:
///Constructor
/** \param actor Actor to fight **/
2014-01-15 20:56:55 +00:00
AiCombat(const MWWorld::Ptr& actor);
2013-09-25 16:01:36 +00:00
2014-06-12 21:27:04 +00:00
AiCombat (const ESM::AiSequence::AiCombat* combat);
void init();
2013-09-25 16:01:36 +00:00
virtual AiCombat *clone() const;
virtual bool execute (const MWWorld::Ptr& actor, AiState& state, float duration);
2013-09-25 16:01:36 +00:00
virtual int getTypeId() const;
virtual unsigned int getPriority() const;
///Returns target ID
2014-05-17 15:20:57 +00:00
MWWorld::Ptr getTarget() const;
2014-06-12 21:27:04 +00:00
virtual void writeState(ESM::AiSequence::AiSequence &sequence) const;
2013-09-25 16:01:36 +00:00
private:
int mTargetActorId;
2014-01-15 20:56:55 +00:00
void buildNewPath(const MWWorld::Ptr& actor, const MWWorld::Ptr& target);
2013-09-25 16:01:36 +00:00
};
2013-09-25 16:01:36 +00:00
}
#endif