Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
AIGuardMachine Class Reference

#include <AIGuard.h>

Inherits StateMachine.

Public Member Functions

 AIGuardMachine (Object *owner)
 
ObjectfindTargetToGuardByID (void)
 
void setTargetToGuard (const Object *object)
 
const Coord3DgetPositionToGuard (void) const
 
void setTargetPositionToGuard (const Coord3D *pos)
 
const PolygonTriggergetAreaToGuard (void) const
 
void setAreaToGuard (const PolygonTrigger *area)
 
void setNemesisID (ObjectID id)
 
ObjectID getNemesisID () const
 
GuardMode getGuardMode () const
 
void setGuardMode (GuardMode guardMode)
 
Bool lookForInnerTarget (void)
 
- Public Member Functions inherited from StateMachine
 StateMachine (Object *owner, AsciiString name)
 
virtual StateReturnType updateStateMachine ()
 run one step of the machine
 
virtual void clear ()
 clear the machine's internals to a known, initialized state
 
virtual StateReturnType resetToDefaultState ()
 clear the machine's internals and set to the default state
 
virtual StateReturnType initDefaultState ()
 
virtual StateReturnType setState (StateID newStateID)
 change the current state of the machine (which may cause further state changes, due to onEnter)
 
StateID getCurrentStateID () const
 return the id of the current state of the machine
 
Bool isInIdleState () const
 
Bool isInAttackState () const
 
Bool isInForceAttackState () const
 
Bool isInGuardIdleState () const
 
Bool isInBusyState () const
 
void lock (const char *msg)
 
void unlock ()
 
Bool isLocked () const
 
ObjectgetOwner ()
 
const ObjectgetOwner () const
 
void setGoalObject (const Object *obj)
 
ObjectgetGoalObject ()
 
const ObjectgetGoalObject () const
 
void setGoalPosition (const Coord3D *pos)
 
const Coord3DgetGoalPosition () const
 
Bool isGoalObjectDestroyed () const
 Returns true if we had a goal object, but it has been destroyed.
 
virtual void halt (void)
 Stops the state machine & disables it in preparation for deleting it.
 
StateReturnType internalSetState (StateID newStateID)
 for internal use only - change the current state of the machine
 
Bool getWantsDebugOutput () const
 
AsciiString getCurrentStateName () const
 
- Public Member Functions inherited from MemoryPoolObject
void deleteInstance ()
 
- Public Member Functions inherited from Snapshot
 Snapshot (void)
 
 ~Snapshot (void)
 

Static Public Member Functions

static Real getStdGuardRange (const Object *obj)
 

Protected Member Functions

virtual void crc (Xfer *xfer)
 
virtual void xfer (Xfer *xfer)
 
virtual void loadPostProcess ()
 
- Protected Member Functions inherited from StateMachine
void defineState (StateID id, State *state, StateID successID, StateID failureID, const StateConditionInfo *conditions=NULL)
 
StateinternalGetState (StateID id)
 
- Protected Member Functions inherited from MemoryPoolObject
virtual ~MemoryPoolObject ()
 
void * operator new (size_t s)
 
void operator delete (void *p)
 
virtual MemoryPoolgetObjectMemoryPool ()=0
 

Detailed Description

Definition at line 95 of file AIGuard.h.

Constructor & Destructor Documentation

◆ AIGuardMachine()

AIGuardMachine::AIGuardMachine ( Object * owner)

The implementation of this constructor defines the states used by this machine.

Definition at line 166 of file AIGuard.cpp.

Member Function Documentation

◆ crc()

void AIGuardMachine::crc ( Xfer * xfer)
protectedvirtual

CRC

Reimplemented from StateMachine.

Definition at line 316 of file AIGuard.cpp.

◆ findTargetToGuardByID()

Object * AIGuardMachine::findTargetToGuardByID ( void )
inline

Definition at line 118 of file AIGuard.h.

◆ getAreaToGuard()

const PolygonTrigger * AIGuardMachine::getAreaToGuard ( void ) const
inline

Definition at line 124 of file AIGuard.h.

◆ getGuardMode()

GuardMode AIGuardMachine::getGuardMode ( ) const
inline

Definition at line 130 of file AIGuard.h.

◆ getNemesisID()

ObjectID AIGuardMachine::getNemesisID ( ) const
inline

Definition at line 128 of file AIGuard.h.

◆ getPositionToGuard()

const Coord3D * AIGuardMachine::getPositionToGuard ( void ) const
inline

Definition at line 121 of file AIGuard.h.

◆ getStdGuardRange()

Real AIGuardMachine::getStdGuardRange ( const Object * obj)
static

Definition at line 201 of file AIGuard.cpp.

◆ loadPostProcess()

void AIGuardMachine::loadPostProcess ( void )
protectedvirtual

Load post process

Reimplemented from StateMachine.

Definition at line 353 of file AIGuard.cpp.

◆ lookForInnerTarget()

Bool AIGuardMachine::lookForInnerTarget ( void )

Definition at line 210 of file AIGuard.cpp.

◆ setAreaToGuard()

void AIGuardMachine::setAreaToGuard ( const PolygonTrigger * area)
inline

Definition at line 125 of file AIGuard.h.

◆ setGuardMode()

void AIGuardMachine::setGuardMode ( GuardMode guardMode)
inline

Definition at line 131 of file AIGuard.h.

◆ setNemesisID()

void AIGuardMachine::setNemesisID ( ObjectID id)
inline

Definition at line 127 of file AIGuard.h.

◆ setTargetPositionToGuard()

void AIGuardMachine::setTargetPositionToGuard ( const Coord3D * pos)
inline

Definition at line 122 of file AIGuard.h.

◆ setTargetToGuard()

void AIGuardMachine::setTargetToGuard ( const Object * object)
inline

Definition at line 119 of file AIGuard.h.

◆ xfer()

void AIGuardMachine::xfer ( Xfer * xfer)
protectedvirtual

Xfer Method

Reimplemented from StateMachine.

Definition at line 323 of file AIGuard.cpp.


The documentation for this class was generated from the following files: