#include <AI.h>
Inherits MemoryPoolObject, and Snapshot.
Public Member Functions | |
| void | crc (Xfer *xfer) |
| run the "light" crc check on this data structure | |
| void | xfer (Xfer *xfer) |
| void | loadPostProcess (void) |
| void | groupMoveToPosition (const Coord3D *pos, Bool addWaypoint, CommandSourceType cmdSource) |
| void | groupMoveToAndEvacuate (const Coord3D *pos, CommandSourceType cmdSource) |
| move to given position(s) | |
| void | groupMoveToAndEvacuateAndExit (const Coord3D *pos, CommandSourceType cmdSource) |
| move to given position & unload transport. | |
| void | groupIdle (CommandSourceType cmdSource) |
| Enter idle state. | |
| void | groupScatter (CommandSourceType cmdSource) |
| Enter idle state. | |
| void | groupCreateFormation (CommandSourceType cmdSource) |
| Make the current selection a user formation. | |
| void | groupTightenToPosition (const Coord3D *pos, Bool addWaypoint, CommandSourceType cmdSource) |
| move to given position(s) | |
| void | groupFollowWaypointPath (const Waypoint *way, CommandSourceType cmdSource) |
| start following the path from the given point | |
| void | groupFollowWaypointPathAsTeam (const Waypoint *way, CommandSourceType cmdSource) |
| start following the path from the given point | |
| void | groupFollowWaypointPathExact (const Waypoint *way, CommandSourceType cmdSource) |
| start following the path from the given point | |
| void | groupFollowWaypointPathAsTeamExact (const Waypoint *way, CommandSourceType cmdSource) |
| start following the path from the given point | |
| void | groupFollowPath (const std::vector< Coord3D > *path, Object *ignoreObject, CommandSourceType cmdSource) |
| follow the path defined by the given array of points | |
| void | groupAttackObject (Object *victim, Int maxShotsToFire, CommandSourceType cmdSource) |
| void | groupForceAttackObject (Object *victim, Int maxShotsToFire, CommandSourceType cmdSource) |
| void | groupAttackTeam (const Team *team, Int maxShotsToFire, CommandSourceType cmdSource) |
| attack the given team | |
| void | groupAttackPosition (const Coord3D *pos, Int maxShotsToFire, CommandSourceType cmdSource) |
| attack given spot | |
| void | groupAttackMoveToPosition (const Coord3D *pos, Int maxShotsToFire, CommandSourceType cmdSource) |
| Attack move to the location. | |
| void | groupHunt (CommandSourceType cmdSource) |
| begin "seek and destroy" | |
| void | groupRepair (Object *obj, CommandSourceType cmdSource) |
| repair the given object | |
| void | groupResumeConstruction (Object *obj, CommandSourceType cmdSource) |
| resume construction on the object | |
| void | groupGetHealed (Object *healDepot, CommandSourceType cmdSource) |
| go get healed at the heal depot | |
| void | groupGetRepaired (Object *repairDepot, CommandSourceType cmdSource) |
| go get repaired at the repair depot | |
| void | groupEnter (Object *obj, CommandSourceType cmdSource) |
| enter the given object | |
| void | groupDock (Object *obj, CommandSourceType cmdSource) |
| get near given object and wait for enter clearance | |
| void | groupExit (Object *objectToExit, CommandSourceType cmdSource) |
| get out of this Object | |
| void | groupEvacuate (CommandSourceType cmdSource) |
| empty its contents | |
| void | groupExecuteRailedTransport (CommandSourceType cmdSource) |
| execute railed transport events | |
| void | groupGoProne (const DamageInfo *damageInfo, CommandSourceType cmdSource) |
| life altering state change, if this AI can do it | |
| void | groupGuardPosition (const Coord3D *pos, GuardMode guardMode, CommandSourceType cmdSource) |
| guard the given spot | |
| void | groupGuardObject (Object *objToGuard, GuardMode guardMode, CommandSourceType cmdSource) |
| guard an object | |
| void | groupGuardArea (const PolygonTrigger *areaToGuard, GuardMode guardMode, CommandSourceType cmdSource) |
| guard an area | |
| void | groupAttackArea (const PolygonTrigger *areaToGuard, CommandSourceType cmdSource) |
| guard an area | |
| void | groupHackInternet (CommandSourceType cmdSource) |
| Begin hacking the internet for free cash from the heavens. | |
| void | groupDoSpecialPower (UnsignedInt specialPowerID, UnsignedInt commandOptions) |
| void | groupDoSpecialPowerAtObject (UnsignedInt specialPowerID, Object *object, UnsignedInt commandOptions) |
| void | groupDoSpecialPowerAtLocation (UnsignedInt specialPowerID, const Coord3D *location, Real angle, const Object *object, UnsignedInt commandOptions) |
| void | groupCheer (CommandSourceType cmdSource) |
| void | groupSell (CommandSourceType cmdSource) |
| void | groupToggleOvercharge (CommandSourceType cmdSource) |
| void | groupCombatDrop (Object *target, const Coord3D &pos, CommandSourceType cmdSource) |
| void | groupDoCommandButton (const CommandButton *commandButton, CommandSourceType cmdSource) |
| void | groupDoCommandButtonAtPosition (const CommandButton *commandButton, const Coord3D *pos, CommandSourceType cmdSource) |
| void | groupDoCommandButtonUsingWaypoints (const CommandButton *commandButton, const Waypoint *way, CommandSourceType cmdSource) |
| void | groupDoCommandButtonAtObject (const CommandButton *commandButton, Object *obj, CommandSourceType cmdSource) |
| void | groupSetEmoticon (const AsciiString &name, Int duration) |
| void | groupOverrideSpecialPowerDestination (SpecialPowerType spType, const Coord3D *loc, CommandSourceType cmdSource) |
| void | setAttitude (AttitudeType tude) |
| set the behavior modifier for this agent | |
| AttitudeType | getAttitude (void) const |
| get the current behavior modifier state | |
| Bool | isIdle () const |
| Bool | isBusy () const |
| Bool | isGroupAiDead () const |
| Object * | getSpecialPowerSourceObject (UnsignedInt specialPowerID) |
| Object * | getCommandButtonSourceObject (GUICommandType type) |
| Bool | isMember (Object *obj) |
| return true if object is in this group | |
| Real | getSpeed (void) |
| return the speed of the group's slowest member | |
| Bool | getCenter (Coord3D *center) |
| compute centroid of group | |
| Bool | getMinMaxAndCenter (Coord2D *min, Coord2D *max, Coord3D *center) |
| void | computeIndividualDestination (Coord3D *dest, const Coord3D *groupDest, Object *obj, const Coord3D *center, Bool isFormation) |
| compute destination of individual object, based on group destination | |
| Int | getCount (void) |
| return the number of objects in the group | |
| Bool | isEmpty (void) |
| returns true if the group has no members | |
| void | queueUpgrade (const UpgradeTemplate *upgrade) |
| queue an upgrade | |
| void | add (Object *obj) |
| add object to group | |
| Bool | remove (Object *obj) |
| Bool | containsAnyObjectsNotOwnedByPlayer (const Player *ownerPlayer) |
| Bool | removeAnyObjectsNotOwnedByPlayer (const Player *ownerPlayer) |
| UnsignedInt | getID (void) |
| get IDs for every object in this group | |
| const VecObjectID & | getAllIDs (void) const |
| void | recomputeGroupSpeed () |
| void | setMineClearingDetail (Bool set) |
| Bool | setWeaponLockForGroup (WeaponSlotType weaponSlot, WeaponLockType lockType) |
| Set the groups' weapon choice. | |
| void | releaseWeaponLockForGroup (WeaponLockType lockType) |
| Clear each guys weapon choice. | |
| void | setWeaponSetFlag (WeaponSetType wst) |
Public Member Functions inherited from MemoryPoolObject | |
| void | deleteInstance () |
Public Member Functions inherited from Snapshot | |
| Snapshot (void) | |
| ~Snapshot (void) | |
Protected Member Functions | |
| MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE (AIGroup, "AIGroupPool") | |
| ListObjectPtrIt | internalRemove (ListObjectPtrIt iterToRemove) |
| Bool | friend_moveInfantryToPos (const Coord3D *pos, CommandSourceType cmdSource) |
| Bool | friend_moveVehicleToPos (const Coord3D *pos, CommandSourceType cmdSource) |
| void | friend_moveFormationToPos (const Coord3D *pos, CommandSourceType cmdSource) |
| Bool | friend_computeGroundPath (const Coord3D *pos, CommandSourceType cmdSource) |
Protected Member Functions inherited from MemoryPoolObject | |
| virtual | ~MemoryPoolObject () |
| void * | operator new (size_t s) |
| void | operator delete (void *p) |
| virtual MemoryPool * | getObjectMemoryPool ()=0 |
Friends | |
| class | AI |
An "AIGroup" is a simple collection of AI objects, used by the AI for such things as Group Pathfinding.
| void AIGroup::add | ( | Object * | obj | ) |
add object to group
Add object to group. Only allow AI agents into the group.
Definition at line 170 of file AIGroup.cpp.
| void AIGroup::computeIndividualDestination | ( | Coord3D * | dest, |
| const Coord3D * | groupDest, | ||
| Object * | obj, | ||
| const Coord3D * | center, | ||
| Bool | isFormation ) |
compute destination of individual object, based on group destination
Given a destination location, compute the destination position for this object such that it keeps its relative position with the group.
Definition at line 480 of file AIGroup.cpp.
If the group contains any objects not owned by ownerPlayer, return TRUE.
Definition at line 238 of file AIGroup.cpp.
|
virtual |
run the "light" crc check on this data structure
Implements Snapshot.
Definition at line 3276 of file AIGroup.cpp.
|
protected |
Move to given position(s)
Definition at line 528 of file AIGroup.cpp.
|
protected |
Move to given position(s)
Definition at line 1040 of file AIGroup.cpp.
|
protected |
Move to given position(s)
Definition at line 683 of file AIGroup.cpp.
|
protected |
Move to given position(s)
Definition at line 1143 of file AIGroup.cpp.
| const VecObjectID & AIGroup::getAllIDs | ( | void | ) | const |
Return the group IDs for every member in this group
Definition at line 127 of file AIGroup.cpp.
| AttitudeType AIGroup::getAttitude | ( | void | ) | const |
get the current behavior modifier state
Get the current behavior modifier state
Definition at line 3008 of file AIGroup.cpp.
compute centroid of group
Compute the centroid of the group
Definition at line 289 of file AIGroup.cpp.
| Object * AIGroup::getCommandButtonSourceObject | ( | GUICommandType | type | ) |
Definition at line 3213 of file AIGroup.cpp.
| Int AIGroup::getCount | ( | void | ) |
return the number of objects in the group
Return the number of objects in the group
Definition at line 463 of file AIGroup.cpp.
| UnsignedInt AIGroup::getID | ( | void | ) |
get IDs for every object in this group
Return this group's unique ID
Definition at line 119 of file AIGroup.cpp.
Definition at line 344 of file AIGroup.cpp.
| Object * AIGroup::getSpecialPowerSourceObject | ( | UnsignedInt | specialPowerID | ) |
Definition at line 3194 of file AIGroup.cpp.
| Real AIGroup::getSpeed | ( | void | ) |
return the speed of the group's slowest member
Return the speed of the group's slowest member
Definition at line 145 of file AIGroup.cpp.
| void AIGroup::groupAttackArea | ( | const PolygonTrigger * | areaToGuard, |
| CommandSourceType | cmdSource ) |
| void AIGroup::groupAttackMoveToPosition | ( | const Coord3D * | pos, |
| Int | maxShotsToFire, | ||
| CommandSourceType | cmdSource ) |
|
inline |
| void AIGroup::groupAttackPosition | ( | const Coord3D * | pos, |
| Int | maxShotsToFire, | ||
| CommandSourceType | cmdSource ) |
| void AIGroup::groupAttackTeam | ( | const Team * | team, |
| Int | maxShotsToFire, | ||
| CommandSourceType | cmdSource ) |
| void AIGroup::groupCheer | ( | CommandSourceType | cmdSource | ) |
Definition at line 2775 of file AIGroup.cpp.
| void AIGroup::groupCombatDrop | ( | Object * | target, |
| const Coord3D & | pos, | ||
| CommandSourceType | cmdSource ) |
Combat drop
Definition at line 2891 of file AIGroup.cpp.
| void AIGroup::groupCreateFormation | ( | CommandSourceType | cmdSource | ) |
Make the current selection a user formation.
| cmdSource | Create a formation. |
Definition at line 2593 of file AIGroup.cpp.
| void AIGroup::groupDock | ( | Object * | obj, |
| CommandSourceType | cmdSource ) |
get near given object and wait for enter clearance
Get near given object and wait for enter clearance
Definition at line 2400 of file AIGroup.cpp.
| void AIGroup::groupDoCommandButton | ( | const CommandButton * | commandButton, |
| CommandSourceType | cmdSource ) |
Definition at line 2915 of file AIGroup.cpp.
| void AIGroup::groupDoCommandButtonAtObject | ( | const CommandButton * | commandButton, |
| Object * | obj, | ||
| CommandSourceType | cmdSource ) |
Definition at line 2973 of file AIGroup.cpp.
| void AIGroup::groupDoCommandButtonAtPosition | ( | const CommandButton * | commandButton, |
| const Coord3D * | pos, | ||
| CommandSourceType | cmdSource ) |
Definition at line 2935 of file AIGroup.cpp.
| void AIGroup::groupDoCommandButtonUsingWaypoints | ( | const CommandButton * | commandButton, |
| const Waypoint * | way, | ||
| CommandSourceType | cmdSource ) |
Definition at line 2954 of file AIGroup.cpp.
| void AIGroup::groupDoSpecialPower | ( | UnsignedInt | specialPowerID, |
| UnsignedInt | commandOptions ) |
The unit(s)/structure will perform it's special power – special powers triggered by buildings don't use AIUpdateInterfaces!!! No special power uses an AIUpdateInterface immediately, but special abilities, which are derived from special powers do... and are unit triggered. Those do have AI.
Definition at line 2638 of file AIGroup.cpp.
| void AIGroup::groupDoSpecialPowerAtLocation | ( | UnsignedInt | specialPowerID, |
| const Coord3D * | location, | ||
| Real | angle, | ||
| const Object * | objectInWay, | ||
| UnsignedInt | commandOptions ) |
The unit(s)/structure will perform it's special power – special powers triggered by buildings don't use AIUpdateInterfaces!!! No special power uses an AIUpdateInterface immediately, but special abilities, which are derived from special powers do... and are unit triggered. Those do have AI.
Definition at line 2676 of file AIGroup.cpp.
| void AIGroup::groupDoSpecialPowerAtObject | ( | UnsignedInt | specialPowerID, |
| Object * | target, | ||
| UnsignedInt | commandOptions ) |
The unit(s)/structure will perform it's special power – special powers triggered by buildings don't use AIUpdateInterfaces!!! No special power uses an AIUpdateInterface immediately, but special abilities, which are derived from special powers do... and are unit triggered. Those do have AI.
Definition at line 2725 of file AIGroup.cpp.
| void AIGroup::groupEnter | ( | Object * | obj, |
| CommandSourceType | cmdSource ) |
| void AIGroup::groupEvacuate | ( | CommandSourceType | cmdSource | ) |
| void AIGroup::groupExecuteRailedTransport | ( | CommandSourceType | cmdSource | ) |
execute railed transport events
Execute railed transport behavior
Definition at line 2470 of file AIGroup.cpp.
| void AIGroup::groupExit | ( | Object * | objectToExit, |
| CommandSourceType | cmdSource ) |
get out of this Object
Get out of whatever it is inside of
Definition at line 2416 of file AIGroup.cpp.
| void AIGroup::groupFollowPath | ( | const std::vector< Coord3D > * | path, |
| Object * | ignoreObject, | ||
| CommandSourceType | cmdSource ) |
follow the path defined by the given array of points
Follow the path defined by the given array of points
Definition at line 2114 of file AIGroup.cpp.
| void AIGroup::groupFollowWaypointPath | ( | const Waypoint * | way, |
| CommandSourceType | cmdSource ) |
start following the path from the given point
Start following the path from the given point
Definition at line 1943 of file AIGroup.cpp.
| void AIGroup::groupFollowWaypointPathAsTeam | ( | const Waypoint * | way, |
| CommandSourceType | cmdSource ) |
start following the path from the given point
Start following the path from the given point
Definition at line 2008 of file AIGroup.cpp.
| void AIGroup::groupFollowWaypointPathAsTeamExact | ( | const Waypoint * | way, |
| CommandSourceType | cmdSource ) |
start following the path from the given point
Start following the path from the given point
Definition at line 2024 of file AIGroup.cpp.
| void AIGroup::groupFollowWaypointPathExact | ( | const Waypoint * | way, |
| CommandSourceType | cmdSource ) |
start following the path from the given point
Start following the path from the given point
Definition at line 1959 of file AIGroup.cpp.
|
inline |
| void AIGroup::groupGetHealed | ( | Object * | healDepot, |
| CommandSourceType | cmdSource ) |
go get healed at the heal depot
Get healed at the heal depot
Definition at line 2352 of file AIGroup.cpp.
| void AIGroup::groupGetRepaired | ( | Object * | repairDepot, |
| CommandSourceType | cmdSource ) |
go get repaired at the repair depot
Get repaired at the repair depot
Definition at line 2368 of file AIGroup.cpp.
| void AIGroup::groupGoProne | ( | const DamageInfo * | damageInfo, |
| CommandSourceType | cmdSource ) |
life altering state change, if this AI can do it
< life altering state change, if this AI can do it
Definition at line 2486 of file AIGroup.cpp.
| void AIGroup::groupGuardArea | ( | const PolygonTrigger * | areaToGuard, |
| GuardMode | guardMode, | ||
| CommandSourceType | cmdSource ) |
| void AIGroup::groupGuardObject | ( | Object * | objToGuard, |
| GuardMode | guardMode, | ||
| CommandSourceType | cmdSource ) |
| void AIGroup::groupGuardPosition | ( | const Coord3D * | pos, |
| GuardMode | guardMode, | ||
| CommandSourceType | cmdSource ) |
| void AIGroup::groupHackInternet | ( | CommandSourceType | cmdSource | ) |
Begin hacking the internet for free cash from the heavens.
| cmdSource | Begin hacking the internet for free cash from the heavens. |
Definition at line 2579 of file AIGroup.cpp.
| void AIGroup::groupHunt | ( | CommandSourceType | cmdSource | ) |
| void AIGroup::groupIdle | ( | CommandSourceType | cmdSource | ) |
| void AIGroup::groupMoveToAndEvacuate | ( | const Coord3D * | pos, |
| CommandSourceType | cmdSource ) |
move to given position(s)
Move to given position and unload transports.
Definition at line 1975 of file AIGroup.cpp.
| void AIGroup::groupMoveToAndEvacuateAndExit | ( | const Coord3D * | pos, |
| CommandSourceType | cmdSource ) |
move to given position & unload transport.
Move to given position and unload transports. transport returns and deletes itself.
Definition at line 1992 of file AIGroup.cpp.
| void AIGroup::groupMoveToPosition | ( | const Coord3D * | p_posIn, |
| Bool | addWaypoint, | ||
| CommandSourceType | cmdSource ) |
Move to given position(s)
Definition at line 1552 of file AIGroup.cpp.
| void AIGroup::groupOverrideSpecialPowerDestination | ( | SpecialPowerType | spType, |
| const Coord3D * | loc, | ||
| CommandSourceType | cmdSource ) |
Definition at line 3258 of file AIGroup.cpp.
| void AIGroup::groupRepair | ( | Object * | obj, |
| CommandSourceType | cmdSource ) |
| void AIGroup::groupResumeConstruction | ( | Object * | obj, |
| CommandSourceType | cmdSource ) |
resume construction on the object
Resume construction on object
Definition at line 2336 of file AIGroup.cpp.
| void AIGroup::groupScatter | ( | CommandSourceType | cmdSource | ) |
| void AIGroup::groupSell | ( | CommandSourceType | cmdSource | ) |
Sell all things in the group ... if possible
Definition at line 2791 of file AIGroup.cpp.
| void AIGroup::groupSetEmoticon | ( | const AsciiString & | name, |
| Int | duration ) |
Definition at line 3243 of file AIGroup.cpp.
| void AIGroup::groupTightenToPosition | ( | const Coord3D * | pos, |
| Bool | addWaypoint, | ||
| CommandSourceType | cmdSource ) |
move to given position(s)
Move to given position(s), tightening the formation
Definition at line 1856 of file AIGroup.cpp.
| void AIGroup::groupToggleOvercharge | ( | CommandSourceType | cmdSource | ) |
Tell all things in the group to toggle overcharge ... if possible
Definition at line 2816 of file AIGroup.cpp.
|
protected |
| Bool AIGroup::isBusy | ( | void | ) | const |
Definition at line 3141 of file AIGroup.cpp.
| Bool AIGroup::isEmpty | ( | void | ) |
returns true if the group has no members
Returns true if the group has no members
Definition at line 471 of file AIGroup.cpp.
| Bool AIGroup::isGroupAiDead | ( | void | ) | const |
Definition at line 3175 of file AIGroup.cpp.
| Bool AIGroup::isIdle | ( | void | ) | const |
Definition at line 3110 of file AIGroup.cpp.
return true if object is in this group
Return true if object is in this group
Definition at line 156 of file AIGroup.cpp.
|
virtual |
post process phase for loading save games. All save systems have their xfer run using XferLoad mode, and then all systems each have their post process run
Implements Snapshot.
Definition at line 3315 of file AIGroup.cpp.
|
protected |
| void AIGroup::queueUpgrade | ( | const UpgradeTemplate * | upgrade | ) |
queue an upgrade
Definition at line 3068 of file AIGroup.cpp.
| void AIGroup::releaseWeaponLockForGroup | ( | WeaponLockType | lockType | ) |
Clear each guys weapon choice.
Definition at line 3037 of file AIGroup.cpp.
Remove object from group
Definition at line 206 of file AIGroup.cpp.
Remove any objects that aren't owned by the player, and return true if the group was destroyed due to emptiness
Definition at line 259 of file AIGroup.cpp.
| void AIGroup::setAttitude | ( | AttitudeType | tude | ) |
set the behavior modifier for this agent
Set the behavior modifier for this agent
Definition at line 2992 of file AIGroup.cpp.
| void AIGroup::setMineClearingDetail | ( | Bool | set | ) |
Definition at line 3013 of file AIGroup.cpp.
| Bool AIGroup::setWeaponLockForGroup | ( | WeaponSlotType | weaponSlot, |
| WeaponLockType | lockType ) |
Set the groups' weapon choice.
Definition at line 3025 of file AIGroup.cpp.
| void AIGroup::setWeaponSetFlag | ( | WeaponSetType | wst | ) |
Definition at line 3049 of file AIGroup.cpp.
|
virtual |
run save, load, or deep CRC check on this data structure, the type depends on the setup of the Xfer pointer
Implements Snapshot.
Definition at line 3304 of file AIGroup.cpp.