1 #ifndef GAME_MWMECHANICS_AICOMBAT_H
2 #define GAME_MWMECHANICS_AICOMBAT_H
6 #include <boost/shared_ptr.hpp>
8 #include "../mwworld/cellstore.hpp"
10 #include "../mwbase/world.hpp"
28 struct AiCombatStorage;
Causes the actor to fight another actor.
Definition: aicombat.hpp:31
MWWorld::Ptr getTarget() const
Returns target ID.
Definition: aicombat.cpp:464
void rotateActorOnAxis(const MWWorld::Ptr &actor, int axis, MWMechanics::Movement &actorMovementSettings, MWMechanics::Movement &desiredMovement)
Definition: aicombat.cpp:439
void init()
Definition: aicombat.cpp:113
bool attack(const MWWorld::Ptr &actor, const MWWorld::Ptr &target, AiCombatStorage &storage, CharacterController &characterController)
Returns true if combat should end.
Definition: aicombat.cpp:221
void updateFleeing(const MWWorld::Ptr &actor, const MWWorld::Ptr &target, float duration, AiCombatStorage &storage)
Definition: aicombat.cpp:334
Base class for AI packages.
Definition: aipackage.hpp:32
virtual AiCombat * clone() const
Clones the package.
Definition: aicombat.cpp:469
Definition: character.hpp:145
virtual int getTypeId() const
Definition: aicombat.cpp:454
void updateActorsMovement(const MWWorld::Ptr &actor, float duration, AiCombatStorage &storage)
Transfer desired movement (from AiCombatStorage) to Actor.
Definition: aicombat.cpp:427
Desired movement for an actor.
Definition: movement.hpp:9
virtual bool shouldCancelPreviousAi() const
Upon adding this Ai package, should the Ai Sequence attempt to cancel previous Ai packages (default t...
Definition: aicombat.hpp:56
virtual void writeState(ESM::AiSequence::AiSequence &sequence) const
Definition: aicombat.cpp:474
virtual bool canCancel() const
Can this Ai package be canceled? (default true)
Definition: aicombat.hpp:55
This class holds the variables AiCombat needs which are deleted if the package becomes inactive...
Definition: aicombat.cpp:38
virtual bool execute(const MWWorld::Ptr &actor, CharacterController &characterController, AiState &state, float duration)
Definition: aicombat.cpp:165
AiCombat(const MWWorld::Ptr &actor)
Constructor.
Definition: aicombat.cpp:104
Definition: aisequence.hpp:148
void updateLOS(const MWWorld::Ptr &actor, const MWWorld::Ptr &target, float duration, AiCombatStorage &storage)
Definition: aicombat.cpp:322
virtual unsigned int getPriority() const
Higher number is higher priority (0 being the lowest)
Definition: aicombat.cpp:459
Pointer to a LiveCellRef.
Definition: ptr.hpp:19
int mTargetActorId
Definition: aicombat.hpp:60
Definition: aisequence.hpp:125