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"
|
|
|
|
|
2014-01-15 20:56:55 +00:00
|
|
|
#include "../mwbase/world.hpp"
|
|
|
|
|
2013-09-25 16:01:36 +00:00
|
|
|
namespace MWMechanics
|
|
|
|
{
|
|
|
|
class AiCombat : public AiPackage
|
|
|
|
{
|
|
|
|
public:
|
2014-01-15 20:56:55 +00:00
|
|
|
AiCombat(const MWWorld::Ptr& actor);
|
2013-09-25 16:01:36 +00:00
|
|
|
|
|
|
|
virtual AiCombat *clone() const;
|
|
|
|
|
2013-10-30 19:42:50 +00:00
|
|
|
virtual bool execute (const MWWorld::Ptr& actor,float duration);
|
2013-09-25 16:01:36 +00:00
|
|
|
///< \return Package completed?
|
|
|
|
|
|
|
|
virtual int getTypeId() const;
|
|
|
|
|
2013-11-18 11:33:09 +00:00
|
|
|
virtual unsigned int getPriority() const;
|
|
|
|
|
2014-01-07 00:12:37 +00:00
|
|
|
const std::string &getTargetId() const;
|
|
|
|
|
2013-09-25 16:01:36 +00:00
|
|
|
private:
|
|
|
|
PathFinder mPathFinder;
|
2014-01-15 20:56:55 +00:00
|
|
|
//controls duration of the actual strike
|
|
|
|
float mTimerAttack;
|
|
|
|
float mTimerReact;
|
|
|
|
//controls duration of the sideway & forward moves
|
|
|
|
//when mCombatMove is true
|
|
|
|
float mTimerCombatMove;
|
|
|
|
|
|
|
|
bool mReadyToAttack, mStrike;
|
|
|
|
bool mCloseUp;
|
|
|
|
bool mCombatMove;
|
|
|
|
|
|
|
|
MWMechanics::Movement mMovement;
|
|
|
|
MWWorld::Ptr mTarget;
|
|
|
|
|
|
|
|
void buildNewPath(const MWWorld::Ptr& actor);
|
2013-09-25 16:01:36 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2014-01-07 00:12:37 +00:00
|
|
|
#endif
|