openmw-tes3coop/apps/openmw/mwmechanics/aicombat.hpp
scrawl a1fbd1fcc8 Revert "Merge remote-tracking branch 'mrcheko/master'"
This reverts commit df7c139e2f, reversing
changes made to fec26342cd.
2014-01-26 00:14:49 +01:00

50 lines
1.2 KiB
C++

#ifndef GAME_MWMECHANICS_AICOMBAT_H
#define GAME_MWMECHANICS_AICOMBAT_H
#include "aipackage.hpp"
#include "pathfinding.hpp"
#include "movement.hpp"
#include "../mwbase/world.hpp"
namespace MWMechanics
{
class AiCombat : public AiPackage
{
public:
AiCombat(const MWWorld::Ptr& actor);
virtual AiCombat *clone() const;
virtual bool execute (const MWWorld::Ptr& actor,float duration);
///< \return Package completed?
virtual int getTypeId() const;
virtual unsigned int getPriority() const;
MWWorld::Ptr getTarget() const;
private:
PathFinder mPathFinder;
//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);
};
}
#endif