OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
aiavoiddoor.hpp
Go to the documentation of this file.
1 #ifndef GAME_MWMECHANICS_AIAVOIDDOOR_H
2 #define GAME_MWMECHANICS_AIAVOIDDOOR_H
3 
4 #include "aipackage.hpp"
5 
6 #include <string>
7 
9 
10 #include "../mwworld/class.hpp"
11 
12 #include "pathfinding.hpp"
13 
14 namespace MWMechanics
15 {
17 
19  class AiAvoidDoor : public AiPackage
20  {
21  public:
23  AiAvoidDoor(const MWWorld::ConstPtr& doorPtr);
24 
25  virtual AiAvoidDoor *clone() const;
26 
27  virtual bool execute (const MWWorld::Ptr& actor, CharacterController& characterController, AiState& state, float duration);
28 
29  virtual int getTypeId() const;
30 
31  virtual unsigned int getPriority() const;
32 
33  virtual bool canCancel() const { return false; }
34  virtual bool shouldCancelPreviousAi() const { return false; }
35 
36  private:
37  float mDuration;
40  float mAdjAngle;
41  };
42 }
43 #endif
44 
virtual bool execute(const MWWorld::Ptr &actor, CharacterController &characterController, AiState &state, float duration)
Definition: aiavoiddoor.cpp:20
virtual unsigned int getPriority() const
Higher number is higher priority (0 being the lowest)
Definition: aiavoiddoor.cpp:88
AiPackage to have an actor avoid an opening door.
Definition: aiavoiddoor.hpp:19
AiAvoidDoor(const MWWorld::ConstPtr &doorPtr)
Avoid door until the door is fully open.
Definition: aiavoiddoor.cpp:14
Base class for AI packages.
Definition: aipackage.hpp:32
virtual AiAvoidDoor * clone() const
Clones the package.
Definition: aiavoiddoor.cpp:78
Definition: character.hpp:145
MWWorld::ConstPtr mDoorPtr
Definition: aiavoiddoor.hpp:38
float mAdjAngle
Definition: aiavoiddoor.hpp:40
Pointer to a const LiveCellRef.
Definition: ptr.hpp:90
Definition: defs.hpp:38
float mDuration
Definition: aiavoiddoor.hpp:37
virtual bool canCancel() const
Can this Ai package be canceled? (default true)
Definition: aiavoiddoor.hpp:33
Pointer to a LiveCellRef.
Definition: ptr.hpp:19
ESM::Position mLastPos
Definition: aiavoiddoor.hpp:39
virtual int getTypeId() const
Definition: aiavoiddoor.cpp:83
virtual bool shouldCancelPreviousAi() const
Upon adding this Ai package, should the Ai Sequence attempt to cancel previous Ai packages (default t...
Definition: aiavoiddoor.hpp:34