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

#include <DozerAIUpdate.h>

Inherits AIUpdateInterface, and DozerAIInterface.

Classes

struct  DozerDockPointInfo
 
struct  DozerTaskInfo
 

Public Member Functions

 DozerAIUpdate (Thing *thing, const ModuleData *moduleData)
 
virtual DozerAIInterfacegetDozerAIInterface ()
 
virtual const DozerAIInterfacegetDozerAIInterface () const
 
virtual void onDelete (void)
 
virtual Real getRepairHealthPerSecond (void) const
 get health to repair per second
 
virtual Real getBoredTime (void) const
 how long till we're bored
 
virtual Real getBoredRange (void) const
 when we're bored, we look this far away to do things
 
virtual Objectconstruct (const ThingTemplate *what, const Coord3D *pos, Real angle, Player *owningPlayer, Bool isRebuild)
 construct an object
 
virtual DozerTask getMostRecentCommand (void)
 return task that was most recently issued
 
virtual Bool isTaskPending (DozerTask task)
 is there a desire to do the requested task
 
virtual ObjectID getTaskTarget (DozerTask task)
 get target of task
 
virtual Bool isAnyTaskPending (void)
 is there any dozer task pending
 
virtual DozerTask getCurrentTask (void) const
 return the current task we're doing
 
virtual void setCurrentTask (DozerTask task)
 set the current task of the dozer
 
virtual Bool getIsRebuild (void)
 get whether or not this building is a rebuild.
 
virtual void newTask (DozerTask task, Object *target)
 set a desire to do the requrested task
 
virtual void cancelTask (DozerTask task)
 cancel this task from the queue, if it's the current task the dozer will stop working on it
 
virtual void internalTaskComplete (DozerTask task)
 set a dozer task as successfully completed
 
virtual void internalCancelTask (DozerTask task)
 cancel this task from the dozer
 
virtual void internalTaskCompleteOrCancelled (DozerTask task)
 this is called when tasks are cancelled or completed
 
virtual const Coord3DgetDockPoint (DozerTask task, DozerDockPoint point)
 
virtual void setBuildSubTask (DozerBuildSubTask subTask)
 
virtual DozerBuildSubTask getBuildSubTask (void)
 
virtual UpdateSleepTime update (void)
 the update entry point
 
virtual Bool canAcceptNewRepair (Object *obj)
 
virtual void createBridgeScaffolding (Object *bridgeTower)
 
virtual void removeBridgeScaffolding (Object *bridgeTower)
 
virtual void startBuildingSound (const AudioEventRTS *sound, ObjectID constructionSiteID)
 
virtual void finishBuildingSound ()
 
virtual void aiDoCommand (const AICommandParms *parms)
 
- Public Member Functions inherited from AIUpdateInterface
 AIUpdateInterface (Thing *thing, const ModuleData *moduleData)
 
virtual AIUpdateInterfacegetAIUpdateInterface ()
 
virtual DisabledMaskType getDisabledTypesToProcess () const
 
virtual SupplyTruckAIInterfacegetSupplyTruckAIInterface ()
 
virtual const SupplyTruckAIInterfacegetSupplyTruckAIInterface () const
 
virtual WorkerAIInterfacegetWorkerAIInterface (void)
 
virtual const WorkerAIInterfacegetWorkerAIInterface (void) const
 
virtual HackInternetAIInterfacegetHackInternetAIInterface ()
 
virtual const HackInternetAIInterfacegetHackInternetAIInterface () const
 
virtual AssaultTransportAIInterfacegetAssaultTransportAIInterface ()
 
virtual const AssaultTransportAIInterfacegetAssaultTransportAIInterface () const
 
virtual JetAIUpdategetJetAIUpdate ()
 
virtual const JetAIUpdategetJetAIUpdate () const
 
virtual void joinTeam (void)
 This unit just got added to a team & needs to catch up.
 
Bool areTurretsLinked () const
 
virtual AIFreeToExitType getAiFreeToExit (const Object *exiter) const
 
virtual Bool isAllowedToAdjustDestination () const
 
virtual Bool isAllowedToMoveAwayFromUnit () const
 
virtual ObjectID getBuildingToNotPathAround () const
 
virtual Bool isIdle () const
 
virtual Bool isAttacking () const
 
virtual Bool isClearingMines () const
 
virtual Bool isTaxiingToParking () const
 
virtual Bool isBusy () const
 
virtual void onObjectCreated ()
 
virtual void doQuickExit (const std::vector< Coord3D > *path)
 get out of this Object
 
virtual const Coord3DgetGuardLocation (void) const
 
virtual const ObjectID getGuardObject (void) const
 
virtual const PolygonTriggergetAreaToGuard (void) const
 
virtual GuardTargetType getGuardTargetType () const
 
virtual void clearGuardTargetType ()
 
virtual GuardMode getGuardMode () const
 
void ignoreObstacle (const Object *obj)
 tell the pathfinder to ignore the given object as an obstacle
 
void ignoreObstacleID (ObjectID id)
 tell the pathfinder to ignore the given object as an obstacle
 
AIStateType getAIStateType () const
 What general state is the AIState Machine in?
 
AsciiString getCurrentStateName (void) const
 
virtual ObjectgetEnterTarget ()
 if we are trying to enter something (see enter() above), what is the thing in question? (or null)
 
virtual Bool getSneakyTargetingOffset (Coord3D *offset) const
 
virtual void addTargeter (ObjectID id, Bool add)
 
virtual Bool isTemporarilyPreventingAimSuccess () const
 
void setPriorWaypointID (UnsignedInt id)
 
void setCurrentWaypointID (UnsignedInt id)
 
AIGroupgetGroup (void)
 
Bool isAiInDeadState (void) const
 return true if we are dead
 
void markAsDead (void)
 
Bool isRecruitable (void) const
 
void setIsRecruitable (Bool isRecruitable)
 
Real getDesiredSpeed () const
 
void setDesiredSpeed (Real speed)
 how fast we want to go
 
virtual void setLocomotorGoalPositionOnPath ()
 
virtual void setLocomotorGoalPositionExplicit (const Coord3D &newPos)
 
virtual void setLocomotorGoalOrientation (Real angle)
 
virtual void setLocomotorGoalNone ()
 
virtual Bool isDoingGroundMovement (void) const
 True if moving along ground.
 
Bool isValidLocomotorPosition (const Coord3D *pos) const
 
Bool isAircraftThatAdjustsDestination (void) const
 True if is aircraft that doesn't stack destinations (missles for example do stack destinations.)
 
Real getCurLocomotorSpeed () const
 
Real getLocomotorDistanceToGoal ()
 
const LocomotorgetCurLocomotor () const
 
LocomotorgetCurLocomotor ()
 
LocomotorSetType getCurLocomotorSetType () const
 
Bool hasLocomotorForSurface (LocomotorSurfaceType surfaceType)
 
WhichTurretType getWhichTurretForWeaponSlot (WeaponSlotType wslot, Real *turretAngle, Real *turretPitch=NULL) const
 
WhichTurretType getWhichTurretForCurWeapon () const
 
Bool isWeaponSlotOnTurretAndAimingAtTarget (WeaponSlotType wslot, const Object *victim) const
 
Bool getTurretRotAndPitch (WhichTurretType tur, Real *turretAngle, Real *turretPitch) const
 
Real getTurretTurnRate (WhichTurretType tur) const
 
void setTurretTargetObject (WhichTurretType tur, Object *o, Bool isForceAttacking=FALSE)
 
ObjectgetTurretTargetObject (WhichTurretType tur, Bool clearDeadTargets=TRUE)
 
void setTurretTargetPosition (WhichTurretType tur, const Coord3D *pos)
 
void setTurretEnabled (WhichTurretType tur, Bool enabled)
 
void recenterTurret (WhichTurretType tur)
 
Bool isTurretEnabled (WhichTurretType tur) const
 
Bool isTurretInNaturalPosition (WhichTurretType tur) const
 
Bool queueWaypoint (const Coord3D *pos)
 add waypoint to end of move list. return true if success, false if queue was full and those the waypoint not added
 
void clearWaypointQueue (void)
 reset the waypoint queue to empty
 
void executeWaypointQueue (void)
 start moving along queued waypoints
 
void doPathfind (PathfindServicesInterface *pathfinder)
 
void requestPath (Coord3D *destination, Bool isGoalDestination)
 Queues a request to pathfind to destination.
 
void requestAttackPath (ObjectID victimID, const Coord3D *victimPos)
 computes path to attack the current target, returns false if no path
 
void requestApproachPath (Coord3D *destination)
 computes path to attack the current target, returns false if no path
 
void requestSafePath (ObjectID repulsor1)
 computes path to attack the current target, returns false if no path
 
Bool isWaitingForPath (void) const
 
Bool isAttackPath (void) const
 True if we have a path to an attack location.
 
void cancelPath (void)
 Called if we no longer need the path.
 
PathgetPath (void)
 return the agent's current path
 
const PathgetPath (void) const
 return the agent's current path
 
void destroyPath (void)
 destroy the current path, setting it to NULL
 
UnsignedInt getPathAge (void) const
 return the "age" of the path
 
Bool isPathAvailable (const Coord3D *destination) const
 does a path exist between us and the destination
 
Bool isQuickPathAvailable (const Coord3D *destination) const
 does a path (using quick pathfind) exist between us and the destination
 
Int getNumFramesBlocked (void) const
 
Bool isBlockedAndStuck (void) const
 
Bool canComputeQuickPath (void)
 Returns true if we can quickly comput a path. Usually missiles & the like that just move straight to the destination.
 
Bool computeQuickPath (const Coord3D *destination)
 Computes a quick path to the destination.
 
Bool isMoving () const
 
Bool isMovingAwayFrom (Object *obj) const
 
void friend_startingMove (void)
 
void friend_endingMove (void)
 
void friend_setPath (Path *newPath)
 
Pathfriend_getPath ()
 
void friend_setGoalObject (Object *obj)
 
virtual Bool processCollision (PhysicsBehavior *physics, Object *other)
 Returns true if the physics collide should apply the force. Normally not. jba.
 
ObjectID getIgnoredObstacleID (void) const
 
const WaypointgetCompletedWaypoint (void) const
 
void setCompletedWaypoint (const Waypoint *pWay)
 
const LocomotorSetgetLocomotorSet (void) const
 
void setPathExtraDistance (Real dist)
 
Real getPathExtraDistance () const
 
virtual Bool chooseLocomotorSet (LocomotorSetType wst)
 
virtual CommandSourceType getLastCommandSource () const
 
const AttackPriorityInfogetAttackInfo (void)
 
void setAttackInfo (const AttackPriorityInfo *info)
 
void setCurPathfindCell (const ICoord2D &cell)
 
void setPathfindGoalCell (const ICoord2D &cell)
 
void setPathFromWaypoint (const Waypoint *way, const Coord2D *offset)
 
const ICoord2DgetCurPathfindCell (void) const
 
const ICoord2DgetPathfindGoalCell (void) const
 
Bool hasHigherPathPriority (AIUpdateInterface *otherAI) const
 Return true if our path has higher priority.
 
void setFinalPosition (const Coord3D *pos)
 
void transferAttack (ObjectID fromID, ObjectID toID)
 if we are attacking "fromID", stop that and attack "toID" instead
 
void setCurrentVictim (const Object *nemesis)
 Current victim.
 
ObjectgetCurrentVictim (void) const
 
virtual void notifyVictimIsDead ()
 
const Coord3DgetCurrentVictimPos (void) const
 
void setLocomotorUpgrade (Bool set)
 
void wakeUpAndAttemptToTarget (void)
 
void resetNextMoodCheckTime (void)
 
void setNextMoodCheckTime (UnsignedInt frame)
 
ObjectgetNextMoodTarget (Bool calledByAI, Bool calledDuringIdle)
 
UnsignedInt getNextMoodCheckTime () const
 
UnsignedInt getMoodMatrixValue (void) const
 
UnsignedInt getMoodMatrixActionAdjustment (MoodMatrixAction action) const
 
void setAttitude (AttitudeType tude)
 set the behavior modifier for this agent
 
void evaluateMoraleBonus (void)
 
Bool canPathThroughUnits (void) const
 
void setCanPathThroughUnits (Bool canPath)
 
void notifyCrate (ObjectID id)
 
ObjectID getCrateID (void) const
 
ObjectcheckForCrateToPickup ()
 
void setIgnoreCollisionTime (Int frames)
 
void setQueueForPathTime (Int frames)
 
void friend_setLastCommandSource (CommandSourceType source)
 
Bool canAutoAcquire () const
 
Bool canAutoAcquireWhileStealthed () const
 
StateID getCurrentStateID () const
 
void friend_addToWaypointGoalPath (const Coord3D *pathPoint)
 @ todo – srj sez: JBA NUKE THIS CODE, IT IS EVIL
 
const Coord3Dfriend_getGoalPathPosition (Int index) const
 
Int friend_getWaypointGoalPathSize () const
 
Int friend_getCurrentGoalPathIndex () const
 
void friend_setCurrentGoalPathIndex (Int index)
 
ObjectgetGoalObject ()
 return the id of the current state of the machine
 
const Coord3DgetGoalPosition () const
 return the id of the current state of the machine
 
WhichTurretType friend_getTurretSync () const
 
void friend_setTurretSync (WhichTurretType t)
 
UnsignedInt getPriorWaypointID (void)
 
UnsignedInt getCurrentWaypointID (void)
 
void clearMoveOutOfWay (void)
 
void setTmpValue (Int val)
 
Int getTmpValue (void)
 
Bool getRetryPath (void)
 
void setAllowedToChase (Bool allow)
 
Bool isAllowedToChase () const
 
virtual void friend_notifyStateMachineChanged ()
 
- Public Member Functions inherited from UpdateModule
 UpdateModule (Thing *thing, const ModuleData *moduleData)
 
virtual UpdateModuleInterfacegetUpdate ()
 
DisabledMaskType getDisabledTypesToProcess () const
 
UPDATEMODULE_FRIEND_DECLARATOR UnsignedInt friend_getPriority () const
 
UPDATEMODULE_FRIEND_DECLARATOR UnsignedInt friend_getNextCallFrame () const
 
UPDATEMODULE_FRIEND_DECLARATOR SleepyUpdatePhase friend_getNextCallPhase () const
 
UPDATEMODULE_FRIEND_DECLARATOR void friend_setNextCallFrame (UnsignedInt frame)
 
UPDATEMODULE_FRIEND_DECLARATOR Int friend_getIndexInLogic () const
 
UPDATEMODULE_FRIEND_DECLARATOR void friend_setIndexInLogic (Int i)
 
UPDATEMODULE_FRIEND_DECLARATOR const Objectfriend_getObject () const
 
- Public Member Functions inherited from BehaviorModule
 BehaviorModule (Thing *thing, const ModuleData *moduleData)
 
virtual BodyModuleInterfacegetBody ()
 
virtual CollideModuleInterfacegetCollide ()
 
virtual ContainModuleInterfacegetContain ()
 
virtual CreateModuleInterfacegetCreate ()
 
virtual DamageModuleInterfacegetDamage ()
 
virtual DestroyModuleInterfacegetDestroy ()
 
virtual DieModuleInterfacegetDie ()
 
virtual SpecialPowerModuleInterfacegetSpecialPower ()
 
virtual UpgradeModuleInterfacegetUpgrade ()
 
virtual StealthUpdategetStealth ()
 
virtual SpyVisionUpdategetSpyVisionUpdate ()
 
virtual ParkingPlaceBehaviorInterfacegetParkingPlaceBehaviorInterface ()
 
virtual RebuildHoleBehaviorInterfacegetRebuildHoleBehaviorInterface ()
 
virtual BridgeBehaviorInterfacegetBridgeBehaviorInterface ()
 
virtual BridgeTowerBehaviorInterfacegetBridgeTowerBehaviorInterface ()
 
virtual BridgeScaffoldBehaviorInterfacegetBridgeScaffoldBehaviorInterface ()
 
virtual OverchargeBehaviorInterfacegetOverchargeBehaviorInterface ()
 
virtual TransportPassengerInterfacegetTransportPassengerInterface ()
 
virtual CaveInterfacegetCaveInterface ()
 
virtual LandMineInterfacegetLandMineInterface ()
 
virtual DieModuleInterfacegetEjectPilotDieInterface ()
 
virtual ProjectileUpdateInterfacegetProjectileUpdateInterface ()
 
virtual ExitInterfacegetUpdateExitInterface ()
 
virtual DockUpdateInterfacegetDockUpdateInterface ()
 
virtual RailedTransportDockUpdateInterfacegetRailedTransportDockUpdateInterface (void)
 
virtual SlowDeathBehaviorInterfacegetSlowDeathBehaviorInterface ()
 
virtual SpecialPowerUpdateInterfacegetSpecialPowerUpdateInterface ()
 
virtual SlavedUpdateInterfacegetSlavedUpdateInterface ()
 
virtual ProductionUpdateInterfacegetProductionUpdateInterface ()
 
virtual HordeUpdateInterfacegetHordeUpdateInterface ()
 
virtual PowerPlantUpdateInterfacegetPowerPlantUpdateInterface ()
 
virtual SpawnBehaviorInterfacegetSpawnBehaviorInterface ()
 
virtual CountermeasuresBehaviorInterfacegetCountermeasuresBehaviorInterface ()
 
virtual const CountermeasuresBehaviorInterfacegetCountermeasuresBehaviorInterface () const
 
- Public Member Functions inherited from ObjectModule
 ObjectModule (Thing *thing, const ModuleData *moduleData)
 < this abstract class needs memory pool hooks
 
virtual void onCapture (Player *oldOwner, Player *newOwner)
 
virtual void onDisabledEdge (Bool nowDisabled)
 
- Public Member Functions inherited from Module
 Module (const ModuleData *moduleData)
 < this abstract class needs memory pool hooks
 
virtual NameKeyType getModuleNameKey () const =0
 
NameKeyType getModuleTagNameKey () const
 
virtual void onDrawableBoundToObject ()
 
virtual void preloadAssets (TimeOfDay timeOfDay)
 preload any assets we might have for this time of day
 
- Public Member Functions inherited from MemoryPoolObject
void deleteInstance ()
 
- Public Member Functions inherited from Snapshot
 Snapshot (void)
 
 ~Snapshot (void)
 
- Public Member Functions inherited from AICommandInterface
void aiMoveToPosition (const Coord3D *pos, CommandSourceType cmdSource)
 
void aiMoveToPositionEvenIfSleeping (const Coord3D *pos, CommandSourceType cmdSource)
 
void aiMoveToObject (Object *obj, CommandSourceType cmdSource)
 
void aiTightenToPosition (const Coord3D *pos, CommandSourceType cmdSource)
 
void aiMoveToAndEvacuate (const Coord3D *pos, CommandSourceType cmdSource)
 
void aiMoveToAndEvacuateAndExit (const Coord3D *pos, CommandSourceType cmdSource)
 
void aiIdle (CommandSourceType cmdSource)
 
void aiBusy (CommandSourceType cmdSource)
 
void aiFollowWaypointPath (const Waypoint *way, CommandSourceType cmdSource)
 
void aiFollowWaypointPathExact (const Waypoint *way, CommandSourceType cmdSource)
 
void aiFollowWaypointPathAsTeam (const Waypoint *way, CommandSourceType cmdSource)
 
void aiFollowWaypointPathExactAsTeam (const Waypoint *way, CommandSourceType cmdSource)
 
void aiFollowExitProductionPath (const std::vector< Coord3D > *path, Object *ignoreObject, CommandSourceType cmdSource)
 
void aiFollowPath (const std::vector< Coord3D > *path, Object *ignoreObject, CommandSourceType cmdSource)
 
void aiFollowPathAppend (const Coord3D *pos, CommandSourceType cmdSource)
 
void aiAttackObject (Object *victim, Int maxShotsToFire, CommandSourceType cmdSource)
 
void aiForceAttackObject (Object *victim, Int maxShotsToFire, CommandSourceType cmdSource)
 
void aiGuardRetaliate (Object *victim, const Coord3D *pos, Int maxShotsToFire, CommandSourceType cmdSource)
 
void aiAttackTeam (const Team *team, Int maxShotsToFire, CommandSourceType cmdSource)
 
void aiAttackPosition (const Coord3D *pos, Int maxShotsToFire, CommandSourceType cmdSource)
 
void aiAttackMoveToPosition (const Coord3D *pos, Int maxShotsToFire, CommandSourceType cmdSource)
 
void aiAttackFollowWaypointPath (const Waypoint *way, Int maxShotsToFire, CommandSourceType cmdSource)
 
void aiAttackFollowWaypointPathAsTeam (const Waypoint *way, Int maxShotsToFire, CommandSourceType cmdSource)
 
void aiHunt (CommandSourceType cmdSource)
 
void aiAttackArea (const PolygonTrigger *areaToGuard, CommandSourceType cmdSource)
 
void aiRepair (Object *obj, CommandSourceType cmdSource)
 
void aiResumeConstruction (Object *obj, CommandSourceType cmdSource)
 
void aiGetHealed (Object *healDepot, CommandSourceType cmdSource)
 
void aiGetRepaired (Object *repairDepot, CommandSourceType cmdSource)
 
void aiEnter (Object *obj, CommandSourceType cmdSource)
 
void aiDock (Object *obj, CommandSourceType cmdSource)
 
void aiExit (Object *objectToExit, CommandSourceType cmdSource)
 
void aiExitInstantly (Object *objectToExit, CommandSourceType cmdSource)
 
void aiEvacuate (Bool exposeStealthUnits, CommandSourceType cmdSource)
 
void aiEvacuateInstantly (Bool exposeStealthUnits, CommandSourceType cmdSource)
 
void aiExecuteRailedTransport (CommandSourceType cmdSource)
 
void aiGoProne (const DamageInfo *damageInfo, CommandSourceType cmdSource)
 
void aiGuardPosition (const Coord3D *pos, GuardMode guardMode, CommandSourceType cmdSource)
 
void aiGuardObject (Object *objToGuard, GuardMode guardMode, CommandSourceType cmdSource)
 
void aiGuardArea (const PolygonTrigger *areaToGuard, GuardMode guardMode, CommandSourceType cmdSource)
 
void aiGuardTunnelNetwork (GuardMode guardMode, CommandSourceType cmdSource)
 
void aiHackInternet (CommandSourceType cmdSource)
 
void aiFaceObject (Object *target, CommandSourceType cmdSource)
 
void aiFacePosition (const Coord3D *pos, CommandSourceType cmdSource)
 
void aiRappelInto (Object *target, const Coord3D &pos, CommandSourceType cmdSource)
 
void aiCombatDrop (Object *target, const Coord3D &pos, CommandSourceType cmdSource)
 
void aiDoCommandButton (const CommandButton *commandButton, CommandSourceType cmdSource)
 
void aiDoCommandButtonAtPosition (const CommandButton *commandButton, const Coord3D *pos, CommandSourceType cmdSource)
 
void aiDoCommandButtonAtObject (const CommandButton *commandButton, Object *obj, CommandSourceType cmdSource)
 
void aiMoveAwayFromUnit (Object *obj, CommandSourceType cmdSource)
 
void aiWander (const Waypoint *way, CommandSourceType cmdSource)
 
void aiWanderInPlace (CommandSourceType cmdSource)
 
void aiPanic (const Waypoint *way, CommandSourceType cmdSource)
 

Static Public Member Functions

static Bool findGoodBuildOrRepairPosition (const Object *me, const Object *target, Coord3D &positionOut)
 
static ObjectfindGoodBuildOrRepairPositionAndTarget (Object *me, Object *target, Coord3D &positionOut)
 
- Static Public Member Functions inherited from UpdateModule
static Int getInterfaceMask ()
 
- Static Public Member Functions inherited from BehaviorModule
static Int getInterfaceMask ()
 
static ModuleType getModuleType ()
 
- Static Public Member Functions inherited from Module
static ModuleDatafriend_newModuleData (INI *ini)
 

Protected Member Functions

virtual void privateRepair (Object *obj, CommandSourceType cmdSource)
 repair the target
 
virtual void privateResumeConstruction (Object *obj, CommandSourceType cmdSource)
 resume construction on obj
 
- Protected Member Functions inherited from AIUpdateInterface
virtual void privateMoveToPosition (const Coord3D *pos, CommandSourceType cmdSource)
 move to given position(s) tightening the formation.
 
virtual void privateMoveToObject (Object *obj, CommandSourceType cmdSource)
 move to given object
 
virtual void privateMoveToAndEvacuate (const Coord3D *pos, CommandSourceType cmdSource)
 move to given position(s)
 
virtual void privateMoveToAndEvacuateAndExit (const Coord3D *pos, CommandSourceType cmdSource)
 move to given position & unload transport.
 
virtual void privateIdle (CommandSourceType cmdSource)
 Enter idle state.
 
virtual void privateTightenToPosition (const Coord3D *pos, CommandSourceType cmdSource)
 move to given position(s) tightening the formation.
 
virtual void privateFollowWaypointPath (const Waypoint *way, CommandSourceType cmdSource)
 start following the path from the given point
 
virtual void privateFollowWaypointPathAsTeam (const Waypoint *way, CommandSourceType cmdSource)
 start following the path from the given point
 
virtual void privateFollowWaypointPathExact (const Waypoint *way, CommandSourceType cmdSource)
 start following the path from the given point
 
virtual void privateFollowWaypointPathAsTeamExact (const Waypoint *way, CommandSourceType cmdSource)
 start following the path from the given point
 
virtual void privateFollowPath (const std::vector< Coord3D > *path, Object *ignoreObject, CommandSourceType cmdSource, Bool exitProduction)
 follow the path defined by the given array of points
 
virtual void privateFollowPathAppend (const Coord3D *pos, CommandSourceType cmdSource)
 
virtual void privateAttackObject (Object *victim, Int maxShotsToFire, CommandSourceType cmdSource)
 attack given object
 
virtual void privateForceAttackObject (Object *victim, Int maxShotsToFire, CommandSourceType cmdSource)
 attack given object
 
virtual void privateGuardRetaliate (Object *victim, const Coord3D *pos, Int maxShotsToFire, CommandSourceType cmdSource)
 retaliate and attack attacker – but with guard restrictions
 
virtual void privateAttackTeam (const Team *team, Int maxShotsToFire, CommandSourceType cmdSource)
 attack the given team
 
virtual void privateAttackPosition (const Coord3D *pos, Int maxShotsToFire, CommandSourceType cmdSource)
 attack given spot
 
virtual void privateAttackMoveToPosition (const Coord3D *pos, Int maxShotsToFire, CommandSourceType cmdSource)
 attack move to the given location
 
virtual void privateAttackFollowWaypointPath (const Waypoint *way, Int maxShotsToFire, Bool asTeam, CommandSourceType cmdSource)
 attack move along the following waypoint path, potentially as a team
 
virtual void privateHunt (CommandSourceType cmdSource)
 begin "seek and destroy"
 
virtual void privateGetHealed (Object *healDepot, CommandSourceType cmdSource)
 get healed at heal depot
 
virtual void privateGetRepaired (Object *repairDepot, CommandSourceType cmdSource)
 get repaired at repair depot
 
virtual void privateEnter (Object *obj, CommandSourceType cmdSource)
 enter the given object
 
virtual void privateDock (Object *obj, CommandSourceType cmdSource)
 get near given object and wait for enter clearance
 
virtual void privateExit (Object *objectToExit, CommandSourceType cmdSource)
 get out of this Object
 
virtual void privateExitInstantly (Object *objectToExit, CommandSourceType cmdSource)
 get out of this Object this frame
 
virtual void privateEvacuate (Int exposeStealthUnits, CommandSourceType cmdSource)
 empty its contents
 
virtual void privateEvacuateInstantly (Int exposeStealthUnits, CommandSourceType cmdSource)
 empty its contents this frame
 
virtual void privateExecuteRailedTransport (CommandSourceType cmdSource)
 execute next leg in railed transport sequence
 
virtual void privateGoProne (const DamageInfo *damageInfo, CommandSourceType cmdSource)
 life altering state change, if this AI can do it
 
virtual void privateGuardTunnelNetwork (GuardMode guardMode, CommandSourceType cmdSource)
 guard the given spot
 
virtual void privateGuardPosition (const Coord3D *pos, GuardMode guardMode, CommandSourceType cmdSource)
 guard the given spot
 
virtual void privateGuardObject (Object *objectToGuard, GuardMode guardMode, CommandSourceType cmdSource)
 guard the given object
 
virtual void privateGuardArea (const PolygonTrigger *areaToGuard, GuardMode guardMode, CommandSourceType cmdSource)
 guard the given area
 
virtual void privateAttackArea (const PolygonTrigger *areaToGuard, CommandSourceType cmdSource)
 guard the given area
 
virtual void privateHackInternet (CommandSourceType cmdSource)
 Hack money from the heavens (free money)
 
virtual void privateFaceObject (Object *target, CommandSourceType cmdSource)
 
virtual void privateFacePosition (const Coord3D *pos, CommandSourceType cmdSource)
 
virtual void privateRappelInto (Object *target, const Coord3D &pos, CommandSourceType cmdSource)
 
virtual void privateCombatDrop (Object *target, const Coord3D &pos, CommandSourceType cmdSource)
 
virtual void privateCommandButton (const CommandButton *commandButton, CommandSourceType cmdSource)
 
virtual void privateCommandButtonPosition (const CommandButton *commandButton, const Coord3D *pos, CommandSourceType cmdSource)
 
virtual void privateCommandButtonObject (const CommandButton *commandButton, Object *obj, CommandSourceType cmdSource)
 
virtual void privateWander (const Waypoint *way, CommandSourceType cmdSource)
 Wander around the waypoint path.
 
virtual void privateWanderInPlace (CommandSourceType cmdSource)
 Wander around the current position.
 
virtual void privatePanic (const Waypoint *way, CommandSourceType cmdSource)
 Run screaming down the waypoint path.
 
virtual void privateBusy (CommandSourceType cmdSource)
 Transition to the busy state.
 
virtual void privateMoveAwayFromUnit (Object *unit, CommandSourceType cmdSource)
 Move out of the way of a unit.
 
virtual SleepyUpdatePhase getUpdatePhase () const
 
void setGoalPositionClipped (const Coord3D *in, CommandSourceType cmdSource)
 
virtual Bool isAllowedToRespondToAiCommands (const AICommandParms *parms) const
 
AttitudeType getAttitude (void) const
 get the current behavior modifier state.
 
Bool blockedBy (Object *other)
 Returns true if we are blocked by "other".
 
Bool needToRotate (void)
 Returns true if we are not pointing in the right direction for movement.
 
Real calculateMaxBlockedSpeed (Object *other) const
 
virtual UpdateSleepTime doLocomotor ()
 
void chooseGoodLocomotorFromCurrentSet ()
 
void setLastCommandSource (CommandSourceType source)
 
virtual AIStateMachinemakeStateMachine ()
 
virtual Bool getTreatAsAircraftForLocoDistToGoal () const
 
AIStateMachinegetStateMachine ()
 
const AIStateMachinegetStateMachine () const
 
void wakeUpNow ()
 
- Protected Member Functions inherited from UpdateModule
void setWakeFrame (Object *obj, UpdateSleepTime wakeDelay)
 
UpdateSleepTime getWakeFrame () const
 
UpdateSleepTime frameToSleepTime (UnsignedInt frame1, UnsignedInt frame2=FOREVER, UnsignedInt frame3=FOREVER, UnsignedInt frame4=FOREVER)
 
- Protected Member Functions inherited from BehaviorModule
virtual void crc (Xfer *xfer)
 
virtual void xfer (Xfer *xfer)
 
virtual void loadPostProcess (void)
 
- Protected Member Functions inherited from ObjectModule
ObjectgetObject ()
 
const ObjectgetObject () const
 
- Protected Member Functions inherited from Module
const ModuleDatagetModuleData () const
 
- Protected Member Functions inherited from MemoryPoolObject
virtual ~MemoryPoolObject ()
 
void * operator new (size_t s)
 
void operator delete (void *p)
 
virtual MemoryPoolgetObjectMemoryPool ()=0
 

Protected Attributes

struct DozerAIUpdate::DozerTaskInfo m_task [DOZER_NUM_TASKS]
 tasks we want to do indexed by DozerTask
 
DozerPrimaryStateMachinem_dozerMachine
 the custom state machine for Dozer behavior
 
DozerTask m_currentTask
 current task the dozer is attending to (if any)
 
AudioEventRTS m_buildingSound
 sound is pulled from the object we are building!
 
Bool m_isRebuild
 is this a rebuild of a previous building?
 
struct DozerAIUpdate::DozerDockPointInfo m_dockPoint [DOZER_NUM_TASKS][DOZER_NUM_DOCK_POINTS]
 
DozerBuildSubTask m_buildSubTask
 for building and actually docking for the build
 

Detailed Description

The Dozer AI Update interface. Dozers are workers that are capable of building all the structures available to a player, as well as repairing building, and fortifying civilian structures

Definition at line 194 of file DozerAIUpdate.h.

Constructor & Destructor Documentation

◆ DozerAIUpdate()

DozerAIUpdate::DozerAIUpdate ( Thing * thing,
const ModuleData * moduleData )

Definition at line 1445 of file DozerAIUpdate.cpp.

Member Function Documentation

◆ aiDoCommand()

void DozerAIUpdate::aiDoCommand ( const AICommandParms * parms)
virtual

Reimplemented from AIUpdateInterface.

Definition at line 2343 of file DozerAIUpdate.cpp.

◆ canAcceptNewRepair()

Bool DozerAIUpdate::canAcceptNewRepair ( Object * obj)
virtual

Given our current task and repair target, can we accept this as a new repair target

Implements DozerAIInterface.

Definition at line 1750 of file DozerAIUpdate.cpp.

◆ cancelTask()

void DozerAIUpdate::cancelTask ( DozerTask task)
virtual

cancel this task from the queue, if it's the current task the dozer will stop working on it

Cancel a task and reset the dozer behavior state machine so that it can re-evaluate what it wants to do if it was working on the task being cancelled

Implements DozerAIInterface.

Definition at line 2040 of file DozerAIUpdate.cpp.

◆ construct()

Object * DozerAIUpdate::construct ( const ThingTemplate * what,
const Coord3D * pos,
Real angle,
Player * owningPlayer,
Bool isRebuild )
virtual

construct an object

The entry point of a construct command to the Dozer

Todo
make 'construct' a real AI command and you won't need a special case

Reimplemented from AIUpdateInterface.

Definition at line 1632 of file DozerAIUpdate.cpp.

◆ createBridgeScaffolding()

void DozerAIUpdate::createBridgeScaffolding ( Object * bridgeTower)
virtual

Create the bridge scaffolding if necessary for the bridge that is attached to this tower

Implements DozerAIInterface.

Definition at line 1518 of file DozerAIUpdate.cpp.

◆ findGoodBuildOrRepairPosition()

Bool DozerAIUpdate::findGoodBuildOrRepairPosition ( const Object * me,
const Object * target,
Coord3D & positionOut )
static

Definition at line 1879 of file DozerAIUpdate.cpp.

◆ findGoodBuildOrRepairPositionAndTarget()

Object * DozerAIUpdate::findGoodBuildOrRepairPositionAndTarget ( Object * me,
Object * target,
Coord3D & positionOut )
static

Definition at line 1924 of file DozerAIUpdate.cpp.

◆ finishBuildingSound()

void DozerAIUpdate::finishBuildingSound ( )
virtual

Implements DozerAIInterface.

Definition at line 2436 of file DozerAIUpdate.cpp.

◆ getBoredRange()

Real DozerAIUpdate::getBoredRange ( void ) const
virtual

when we're bored, we look this far away to do things

Implements DozerAIInterface.

Definition at line 2329 of file DozerAIUpdate.cpp.

◆ getBoredTime()

Real DozerAIUpdate::getBoredTime ( void ) const
virtual

how long till we're bored

Implements DozerAIInterface.

Definition at line 2324 of file DozerAIUpdate.cpp.

◆ getBuildSubTask()

virtual DozerBuildSubTask DozerAIUpdate::getBuildSubTask ( void )
inlinevirtual

Implements DozerAIInterface.

Definition at line 254 of file DozerAIUpdate.h.

◆ getCurrentTask()

virtual DozerTask DozerAIUpdate::getCurrentTask ( void ) const
inlinevirtual

return the current task we're doing

Implements DozerAIInterface.

Definition at line 235 of file DozerAIUpdate.h.

◆ getDockPoint()

const Coord3D * DozerAIUpdate::getDockPoint ( DozerTask task,
DozerDockPoint point )
virtual

return a dock point for the action and task (if valid) ... note it can return NULL if no point has been set for the combination of task and point

Implements DozerAIInterface.

Definition at line 2298 of file DozerAIUpdate.cpp.

◆ getDozerAIInterface() [1/2]

virtual DozerAIInterface * DozerAIUpdate::getDozerAIInterface ( )
inlinevirtual

Reimplemented from AIUpdateInterface.

Definition at line 209 of file DozerAIUpdate.h.

◆ getDozerAIInterface() [2/2]

virtual const DozerAIInterface * DozerAIUpdate::getDozerAIInterface ( ) const
inlinevirtual

Reimplemented from AIUpdateInterface.

Definition at line 210 of file DozerAIUpdate.h.

◆ getIsRebuild()

virtual Bool DozerAIUpdate::getIsRebuild ( void )
inlinevirtual

get whether or not this building is a rebuild.

Implements DozerAIInterface.

Definition at line 238 of file DozerAIUpdate.h.

◆ getMostRecentCommand()

DozerTask DozerAIUpdate::getMostRecentCommand ( void )
virtual

return task that was most recently issued

Get the most recently issued task

Implements DozerAIInterface.

Definition at line 2268 of file DozerAIUpdate.cpp.

◆ getRepairHealthPerSecond()

Real DozerAIUpdate::getRepairHealthPerSecond ( void ) const
virtual

get health to repair per second

Implements DozerAIInterface.

Definition at line 2319 of file DozerAIUpdate.cpp.

◆ getTaskTarget()

ObjectID DozerAIUpdate::getTaskTarget ( DozerTask task)
virtual

get target of task

Get the target object of a given task

Implements DozerAIInterface.

Definition at line 2081 of file DozerAIUpdate.cpp.

◆ internalCancelTask()

void DozerAIUpdate::internalCancelTask ( DozerTask task)
virtual

cancel this task from the dozer

Clear a task from the Dozer for consideration, we can use this when a goal object becomes invalid/destroyed etc.

Implements DozerAIInterface.

Definition at line 2117 of file DozerAIUpdate.cpp.

◆ internalTaskComplete()

void DozerAIUpdate::internalTaskComplete ( DozerTask task)
virtual

set a dozer task as successfully completed

Set a task as successfully completed

Implements DozerAIInterface.

Definition at line 2094 of file DozerAIUpdate.cpp.

◆ internalTaskCompleteOrCancelled()

void DozerAIUpdate::internalTaskCompleteOrCancelled ( DozerTask task)
virtual

this is called when tasks are cancelled or completed

This method is called whenever a task is completed OR cancelled

Todo
This would be correct except that we don't have idle crane animations and it is December.

Implements DozerAIInterface.

Definition at line 2146 of file DozerAIUpdate.cpp.

◆ isAnyTaskPending()

Bool DozerAIUpdate::isAnyTaskPending ( void )
virtual

is there any dozer task pending

Is there any task pending

Implements DozerAIInterface.

Definition at line 2067 of file DozerAIUpdate.cpp.

◆ isTaskPending()

Bool DozerAIUpdate::isTaskPending ( DozerTask task)
virtual

is there a desire to do the requested task

Is there a given task waiting to be done

Implements DozerAIInterface.

Definition at line 2054 of file DozerAIUpdate.cpp.

◆ newTask()

void DozerAIUpdate::newTask ( DozerTask task,
Object * target )
virtual

set a desire to do the requrested task

Issue and order to the dozer

Implements DozerAIInterface.

Definition at line 1972 of file DozerAIUpdate.cpp.

◆ onDelete()

void DozerAIUpdate::onDelete ( void )
virtual

If we were building something, kill the active-construction flag on it

Reimplemented from Module.

Definition at line 2242 of file DozerAIUpdate.cpp.

◆ privateRepair()

void DozerAIUpdate::privateRepair ( Object * obj,
CommandSourceType cmdSource )
protectedvirtual

repair the target

Issue an order for the Dozer to go repair the target 'obj'

Reimplemented from AIUpdateInterface.

Definition at line 1806 of file DozerAIUpdate.cpp.

◆ privateResumeConstruction()

void DozerAIUpdate::privateResumeConstruction ( Object * obj,
CommandSourceType cmdSource )
protectedvirtual

resume construction on obj

Resume construction on a building

Reimplemented from AIUpdateInterface.

Definition at line 1861 of file DozerAIUpdate.cpp.

◆ removeBridgeScaffolding()

void DozerAIUpdate::removeBridgeScaffolding ( Object * bridgeTower)
virtual

Remove the bridge scaffolding from the bridge object that is attached to this tower

Implements DozerAIInterface.

Definition at line 1544 of file DozerAIUpdate.cpp.

◆ setBuildSubTask()

virtual void DozerAIUpdate::setBuildSubTask ( DozerBuildSubTask subTask)
inlinevirtual

Implements DozerAIInterface.

Definition at line 253 of file DozerAIUpdate.h.

◆ setCurrentTask()

virtual void DozerAIUpdate::setCurrentTask ( DozerTask task)
inlinevirtual

set the current task of the dozer

Implements DozerAIInterface.

Definition at line 236 of file DozerAIUpdate.h.

◆ startBuildingSound()

void DozerAIUpdate::startBuildingSound ( const AudioEventRTS * sound,
ObjectID constructionSiteID )
virtual

Implements DozerAIInterface.

Definition at line 2428 of file DozerAIUpdate.cpp.

◆ update()

UpdateSleepTime DozerAIUpdate::update ( void )
virtual

the update entry point

Todo
shouldn't this be at a higher level?

Reimplemented from AIUpdateInterface.

Definition at line 1569 of file DozerAIUpdate.cpp.

Member Data Documentation

◆ m_buildingSound

AudioEventRTS DozerAIUpdate::m_buildingSound
protected

sound is pulled from the object we are building!

Definition at line 286 of file DozerAIUpdate.h.

◆ m_buildSubTask

DozerBuildSubTask DozerAIUpdate::m_buildSubTask
protected

for building and actually docking for the build

Definition at line 299 of file DozerAIUpdate.h.

◆ m_currentTask

DozerTask DozerAIUpdate::m_currentTask
protected

current task the dozer is attending to (if any)

Definition at line 285 of file DozerAIUpdate.h.

◆ m_dockPoint

struct DozerAIUpdate::DozerDockPointInfo DozerAIUpdate::m_dockPoint[ DOZER_NUM_TASKS ][ DOZER_NUM_DOCK_POINTS ]
protected

◆ m_dozerMachine

DozerPrimaryStateMachine* DozerAIUpdate::m_dozerMachine
protected

the custom state machine for Dozer behavior

Definition at line 284 of file DozerAIUpdate.h.

◆ m_isRebuild

Bool DozerAIUpdate::m_isRebuild
protected

is this a rebuild of a previous building?

Definition at line 287 of file DozerAIUpdate.h.

◆ m_task

struct DozerAIUpdate::DozerTaskInfo DozerAIUpdate::m_task[ DOZER_NUM_TASKS ]
protected

tasks we want to do indexed by DozerTask


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