#include <AIStateMachine.h>
Inherits State.
Inherited by AIAttackApproachTargetState, AIAttackPursueTargetState, AIDockAdvancePositionState, AIDockApproachState, AIDockMoveToDockState, AIDockMoveToEntryState, AIDockMoveToExitState, AIDockMoveToRallyState, AIEnterState, AIFollowPathState, AIFollowWaypointPathExactState, AIFollowWaypointPathState, AIGuardRetaliateReturnState, AIGuardReturnState, AIMoveAndDeleteState, AIMoveAndEvacuateState, AIMoveAndTightenState, AIMoveOutOfTheWayState, AIMoveToState, AIPickUpCrateState, AIWanderInPlaceState, JetOrHeliReturnForLandingState, and JetOrHeliReturningToDeadAirfieldState.
Public Member Functions | |
| AIInternalMoveToState (StateMachine *machine, AsciiString name) | |
| virtual StateReturnType | onEnter () |
| virtual void | onExit (StateExitType status) |
| virtual StateReturnType | update () |
Public Member Functions inherited from State | |
| State (StateMachine *machine, AsciiString name) | |
| < this abstract class needs memory pool hooks | |
| virtual Bool | isIdle () const |
| virtual Bool | isAttack () const |
| virtual Bool | isGuardIdle () const |
| virtual Bool | isBusy () const |
| StateMachine * | getMachine () |
| return the machine this state is part of | |
| StateID | getID () const |
| get this state's id | |
| Object * | getMachineOwner () |
| const Object * | getMachineOwner () const |
| Object * | getMachineGoalObject () |
| return the machine this state is part of | |
| const Object * | getMachineGoalObject () const |
| return the machine this state is part of | |
| const Coord3D * | getMachineGoalPosition () const |
| return the machine this state is part of | |
| void | friend_setID (StateID id) |
| define this state's id (for use only by StateMachine class) | |
| void | friend_onSuccess (StateID toStateID) |
| define which state to move to after successful completion | |
| void | friend_onFailure (StateID toStateID) |
| define which state to move to after failure | |
| void | friend_onCondition (StateTransFuncPtr test, StateID toStateID, void *userData, const char *description=NULL) |
| define when to change state | |
| StateReturnType | friend_checkForTransitions (StateReturnType status) |
| given a return code, handle state transitions | |
| StateReturnType | friend_checkForSleepTransitions (StateReturnType status) |
| given a return code, handle state transitions | |
Public Member Functions inherited from MemoryPoolObject | |
| void | deleteInstance () |
Public Member Functions inherited from Snapshot | |
| Snapshot (void) | |
| ~Snapshot (void) | |
Protected Member Functions | |
| void | setAdjustsDestination (Bool b) |
| Bool | getAdjustsDestination () const |
| void | setGoalPos (const Coord3D *pos) |
| const Coord3D * | getGoalPos () const |
| virtual Bool | computePath () |
| compute the path | |
| void | forceRepath () |
| virtual void | crc (Xfer *xfer) |
| virtual void | xfer (Xfer *xfer) |
| virtual void | loadPostProcess () |
Protected Member Functions inherited from MemoryPoolObject | |
| virtual | ~MemoryPoolObject () |
| void * | operator new (size_t s) |
| void | operator delete (void *p) |
| virtual MemoryPool * | getObjectMemoryPool ()=0 |
Protected Attributes | |
| Coord3D | m_goalPosition |
| the goal position to move to | |
| PathfindLayerEnum | m_goalLayer |
| The layer we are moving towards. | |
| Coord3D | m_pathGoalPosition |
| the position our current path leads to | |
| Bool | m_waitingForPath |
| If we are waiting for a path. | |
| Bool | m_tryOneMoreRepath |
| If true, after we complete movement do another compute path. | |
Basic pathfinding and moving to a goal position. Not for direct use (hence no associated state ID), but for deriving from.
Definition at line 253 of file AIStateMachine.h.
|
inline |
Definition at line 257 of file AIStateMachine.h.
|
protectedvirtual |
compute the path
(Re)compute a path to the goal position, if we are on our own, or we are the leader of a group.
Reimplemented in AIAttackApproachTargetState, AIAttackPursueTargetState, AIMoveAndTightenState, AIMoveAwayFromRepulsorsState, AIMoveOutOfTheWayState, and AIPickUpCrateState.
Definition at line 1601 of file AIStates.cpp.
|
protectedvirtual |
Implements State.
Reimplemented in AIAttackApproachTargetState, AIAttackFollowWaypointPathState, AIAttackMoveToState, AIAttackPursueTargetState, AIDockApproachState, AIEnterState, AIFollowPathState, AIFollowWaypointPathExactState, AIFollowWaypointPathState, AIGuardRetaliateReturnState, AIGuardReturnState, AIMoveAndDeleteState, AIMoveAndEvacuateState, AIMoveAndTightenState, AIPanicState, AIPickUpCrateState, AITNGuardReturnState, AIWanderInPlaceState, AIWanderState, and ChinookMoveToBldgState.
Definition at line 1552 of file AIStates.cpp.
|
inlineprotected |
Definition at line 281 of file AIStateMachine.h.
|
protected |
Definition at line 1584 of file AIStates.cpp.
|
inlineprotected |
Definition at line 277 of file AIStateMachine.h.
|
protectedvirtual |
Load post process
Implements State.
Reimplemented in AIAttackApproachTargetState, AIAttackFollowWaypointPathState, AIAttackMoveToState, AIAttackPursueTargetState, AIDockApproachState, AIEnterState, AIFollowPathState, AIFollowWaypointPathExactState, AIFollowWaypointPathState, AIGuardRetaliateReturnState, AIGuardReturnState, AIMoveAndDeleteState, AIMoveAndEvacuateState, AIMoveAndTightenState, AIPanicState, AIPickUpCrateState, AITNGuardReturnState, AIWanderInPlaceState, AIWanderState, and ChinookMoveToBldgState.
Definition at line 1579 of file AIStates.cpp.
|
virtual |
We are initiating a moveTo action. Pathfind from m_goalPosition to goal.
Reimplemented from State.
Reimplemented in AIAttackApproachTargetState, AIAttackFollowWaypointPathState, AIAttackMoveToState, AIAttackPursueTargetState, AIDockAdvancePositionState, AIDockApproachState, AIDockMoveToDockState, AIDockMoveToEntryState, AIDockMoveToExitState, AIDockMoveToRallyState, AIEnterState, AIFollowPathState, AIFollowWaypointPathExactState, AIFollowWaypointPathState, AIGuardPickUpCrateState, AIGuardRetaliatePickUpCrateState, AIGuardRetaliateReturnState, AIGuardReturnState, AIMoveAndDeleteState, AIMoveAndEvacuateState, AIMoveAndTightenState, AIMoveAwayFromRepulsorsState, AIMoveOutOfTheWayState, AIMoveToState, AIPanicState, AIPickUpCrateState, AITNGuardPickUpCrateState, AITNGuardReturnState, AIWanderInPlaceState, AIWanderState, ChinookMoveToBldgState, JetOrHeliReturnForLandingState, JetOrHeliReturningToDeadAirfieldState, JetOrHeliTaxiState, and JetTakeoffOrLandingState.
Definition at line 1616 of file AIStates.cpp.
|
virtual |
We are leaving the moveTo state.
Reimplemented from State.
Reimplemented in AIAttackApproachTargetState, AIAttackFollowWaypointPathState, AIAttackMoveToState, AIAttackPursueTargetState, AIDockAdvancePositionState, AIDockApproachState, AIDockMoveToDockState, AIDockMoveToEntryState, AIDockMoveToExitState, AIDockMoveToRallyState, AIEnterState, AIFollowPathState, AIFollowWaypointPathExactState, AIFollowWaypointPathState, AIGuardPickUpCrateState, AIGuardRetaliatePickUpCrateState, AIGuardRetaliateReturnState, AIGuardReturnState, AIMoveAndDeleteState, AIMoveAndEvacuateState, AIMoveAwayFromRepulsorsState, AIMoveOutOfTheWayState, AIMoveToState, AIPanicState, AIPickUpCrateState, AITNGuardPickUpCrateState, AITNGuardReturnState, AIWanderInPlaceState, AIWanderState, ChinookMoveToBldgState, JetOrHeliTaxiState, and JetTakeoffOrLandingState.
Definition at line 1737 of file AIStates.cpp.
|
inlineprotected |
Definition at line 273 of file AIStateMachine.h.
|
inlineprotected |
Definition at line 276 of file AIStateMachine.h.
|
virtual |
Execute the moveTo behavior towards GoalPosition.
Implements State.
Reimplemented in AIAttackApproachTargetState, AIAttackFollowWaypointPathState, AIAttackMoveToState, AIAttackPursueTargetState, AIDockAdvancePositionState, AIDockApproachState, AIDockMoveToDockState, AIDockMoveToEntryState, AIDockMoveToExitState, AIDockMoveToRallyState, AIEnterState, AIFollowPathState, AIFollowWaypointPathExactState, AIFollowWaypointPathState, AIGuardPickUpCrateState, AIGuardRetaliatePickUpCrateState, AIGuardRetaliateReturnState, AIGuardReturnState, AIMoveAndDeleteState, AIMoveAndEvacuateState, AIMoveAndTightenState, AIMoveAwayFromRepulsorsState, AIMoveOutOfTheWayState, AIMoveToState, AIPanicState, AIPickUpCrateState, AITNGuardPickUpCrateState, AITNGuardReturnState, AIWanderInPlaceState, AIWanderState, ChinookMoveToBldgState, JetOrHeliTaxiState, and JetTakeoffOrLandingState.
Definition at line 1767 of file AIStates.cpp.
|
protectedvirtual |
Xfer Method
Implements State.
Reimplemented in AIAttackApproachTargetState, AIAttackFollowWaypointPathState, AIAttackMoveToState, AIAttackPursueTargetState, AIDockApproachState, AIEnterState, AIFollowPathState, AIFollowWaypointPathExactState, AIFollowWaypointPathState, AIGuardRetaliateReturnState, AIGuardReturnState, AIMoveAndDeleteState, AIMoveAndEvacuateState, AIMoveAndTightenState, AIPanicState, AIPickUpCrateState, AITNGuardReturnState, AIWanderInPlaceState, AIWanderState, and ChinookMoveToBldgState.
Definition at line 1559 of file AIStates.cpp.
|
protected |
The layer we are moving towards.
Definition at line 300 of file AIStateMachine.h.
|
protected |
the goal position to move to
Definition at line 299 of file AIStateMachine.h.
|
protected |
the position our current path leads to
Definition at line 301 of file AIStateMachine.h.
|
protected |
If true, after we complete movement do another compute path.
Definition at line 310 of file AIStateMachine.h.
|
protected |
If we are waiting for a path.
Definition at line 309 of file AIStateMachine.h.