1 #ifndef GAME_MWMECHANICS_AISEQUENCE_H
2 #define GAME_MWMECHANICS_AISEQUENCE_H
26 class CharacterController;
64 std::list<AiPackage*>::const_iterator
begin()
const;
65 std::list<AiPackage*>::const_iterator
end()
const;
67 std::list<AiPackage*>::const_iterator
erase (std::list<AiPackage*>::const_iterator package);
base class for the temporary storage of AiPackages.
Definition: aistate.hpp:90
bool mRepeat
Does this AI sequence repeat (repeating of Wander packages handled separately)
Definition: aisequence.hpp:43
void stopCombat()
Removes all combat packages until first non-combat or stack empty.
Definition: aisequence.cpp:125
Definition: aipackage.hpp:90
stores one object of any class derived from Base. Requesting a certain derived class via get() either...
Definition: aisequence.hpp:28
bool isPackageDone() const
Has a package been completed during the last update?
Definition: aisequence.cpp:153
DerivedClassStorage< AiTemporaryBase > AiState
Container for AI package status.
Definition: aisequence.hpp:29
std::list< AiPackage * >::const_iterator end() const
Definition: aisequence.cpp:82
AiSequence()
Default constructor.
Definition: aisequence.cpp:31
void readState(const ESM::AiSequence::AiSequence &sequence)
Definition: aisequence.cpp:375
void stopPursuit()
Removes all pursue packages until first non-pursue or stack empty.
Definition: aisequence.cpp:139
void writeState(ESM::AiSequence::AiSequence &sequence) const
Definition: aisequence.cpp:367
Base class for AI packages.
Definition: aipackage.hpp:32
virtual ~AiSequence()
Definition: aisequence.cpp:54
bool mDone
Finished with top AIPackage, set for one frame.
Definition: aisequence.hpp:40
Sequence of AI-packages for a single actor.
Definition: aisequence.hpp:34
Definition: character.hpp:145
bool canAddTarget(const ESM::Position &actorPos, float distToTarget) const
Function assumes that actor can have only 1 target apart player.
void stack(const AiPackage &package, const MWWorld::Ptr &actor)
Definition: aisequence.cpp:264
int getLastRunTypeId() const
Get the typeid of the Ai package that ran last.
Definition: aisequence.hpp:77
void fill(const ESM::AIPackageList &list)
Fills the AiSequence with packages.
Definition: aisequence.cpp:325
std::list< AiPackage * >::const_iterator begin() const
Iterator may be invalidated by any function calls other than begin() or end().
Definition: aisequence.cpp:77
void copy(const AiSequence &sequence)
Copy AiSequence.
Definition: aisequence.cpp:24
std::list< AiPackage * >::const_iterator erase(std::list< AiPackage * >::const_iterator package)
Definition: aisequence.cpp:87
void execute(const MWWorld::Ptr &actor, CharacterController &characterController, MWMechanics::AiState &state, float duration)
Execute current package, switching if needed.
Definition: aisequence.cpp:166
Definition: aisequence.hpp:148
void fastForward(const MWWorld::Ptr &actor, AiState &state)
Simulate the passing of time using the currently active AI package.
Definition: aisequence.cpp:445
bool getCombatTarget(MWWorld::Ptr &targetActor) const
Return true and assign target if combat package is currently active, return false otherwise...
Definition: aisequence.cpp:67
bool isInCombat() const
Is there any combat package?
Definition: aisequence.cpp:102
int mLastAiPackage
The type of AI package that ran last.
Definition: aisequence.hpp:49
void clear()
Remove all packages.
Definition: aisequence.cpp:256
Pointer to a LiveCellRef.
Definition: ptr.hpp:19
AiSequence & operator=(const AiSequence &sequence)
Assignment operator.
Definition: aisequence.cpp:41
std::list< AiPackage * > mPackages
AiPackages to run though.
Definition: aisequence.hpp:37
int getTypeId() const
Returns currently executing AiPackage type.
Definition: aisequence.cpp:59
AiPackage * getActivePackage()
Return the current active package.
Definition: aisequence.cpp:317