#include <Team.h>
Inherits MemoryPoolObject, and Snapshot.
Public Member Functions | |
| Team (TeamPrototype *proto, TeamID id) | |
| const TeamPrototype * | getPrototype (void) |
| return the prototype used to create this team | |
| void | setID (TeamID id) |
| TeamID | getID () const |
| void | setAttackPriorityName (AsciiString name) |
| Player * | getControllingPlayer () const |
| void | setControllingPlayer (Player *newController) |
| const AsciiString & | getState (void) const |
| void | getTeamAsAIGroup (AIGroup *pAIGroup) |
| const AsciiString & | getName () const |
| Int | getTargetableCount () const |
| void | setState (const AsciiString &state) |
| void | setRecruitable (Bool recruitable) |
| void | setTeamTargetObject (const Object *target) |
| Object * | getTeamTargetObject (void) |
| void | setActive (void) |
| Bool | isActive (void) |
| Bool | isCreated (void) |
| void | setEnteredExited (void) |
| Bool | didEnterOrExit (void) |
| void | updateState (void) |
| void | notifyTeamOfObjectDeath (void) |
| Bool | didAllEnter (PolygonTrigger *pTrigger, UnsignedInt whichToConsider) const |
| All members entered the area. | |
| Bool | didPartialEnter (PolygonTrigger *pTrigger, UnsignedInt whichToConsider) const |
| One member entered the area. | |
| Bool | didAllExit (PolygonTrigger *pTrigger, UnsignedInt whichToConsider) const |
| All members exited the area. | |
| Bool | didPartialExit (PolygonTrigger *pTrigger, UnsignedInt whichToConsider) const |
| One member exited the area. | |
| Bool | allInside (PolygonTrigger *pTrigger, UnsignedInt whichToConsider) const |
| All members are inside the area. | |
| Bool | someInsideSomeOutside (PolygonTrigger *pTrigger, UnsignedInt whichToConsider) const |
| One or more in, one or more out. | |
| Bool | noneInside (PolygonTrigger *pTrigger, UnsignedInt whichToConsider) const |
| No members are in the area. | |
| Object * | tryToRecruit (const ThingTemplate *, const Coord3D *teamHome, Real maxDist) |
| Try to recruit the closest unit of this thing type. Return true if successful. | |
| Relationship | getRelationship (const Team *that) const |
| void | setOverrideTeamRelationship (TeamID teamID, Relationship r) |
| Bool | removeOverrideTeamRelationship (TeamID teamID) |
| void | setOverridePlayerRelationship (Int playerIndex, Relationship r) |
| Bool | removeOverridePlayerRelationship (Int playerIndex) |
| void | countObjectsByThingTemplate (Int numTmplates, const ThingTemplate *const *things, Bool ignoreDead, Int *counts, Bool ignoreUnderConstruction=TRUE) const |
| Int | countBuildings (void) |
| Int | countObjects (KindOfMaskType setMask, KindOfMaskType clearMask) |
| void | healAllObjects () |
| void | iterateObjects (ObjectIterateFunc func, void *userData) |
| Bool | hasAnyBuildings (void) const |
| Bool | hasAnyBuildings (KindOfMaskType kindOf) const |
| Bool | hasAnyUnits (void) const |
| Bool | hasAnyObjects (void) const |
| Bool | isIdle (void) const |
| Bool | unitsEntered (PolygonTrigger *pTrigger) const |
| Bool | hasAnyBuildFacility (void) const |
| void | moveTeamTo (Coord3D destination) |
| Bool | damageTeamMembers (Real amount) |
| void | deleteTeam (Bool ignoreDead=FALSE) |
| const Coord3D * | getEstimateTeamPosition (void) const |
| void | transferUnitsTo (Team *newTeam) |
| void | killTeam (void) |
| void | evacuateTeam (void) |
| const Waypoint * | getCurrentWaypoint (void) |
| void | setCurrentWaypoint (const Waypoint *way) |
| void | updateGenericScripts (void) |
Public Member Functions inherited from MemoryPoolObject | |
| void | deleteInstance () |
Public Member Functions inherited from Snapshot | |
| Snapshot (void) | |
| ~Snapshot (void) | |
Protected Member Functions | |
| virtual void | crc (Xfer *xfer) |
| virtual void | xfer (Xfer *xfer) |
| virtual void | loadPostProcess (void) |
Protected Member Functions inherited from MemoryPoolObject | |
| virtual | ~MemoryPoolObject () |
| void * | operator new (size_t s) |
| void | operator delete (void *p) |
| virtual MemoryPool * | getObjectMemoryPool ()=0 |
| Team::Team | ( | TeamPrototype * | proto, |
| TeamID | id ) |
| Bool Team::allInside | ( | PolygonTrigger * | pTrigger, |
| UnsignedInt | whichToConsider ) const |
| Int Team::countBuildings | ( | void | ) |
| Int Team::countObjects | ( | KindOfMaskType | setMask, |
| KindOfMaskType | clearMask ) |
simply returns the number of objects on this team with a specific KindOfMaskType
| void Team::countObjectsByThingTemplate | ( | Int | numTmplates, |
| const ThingTemplate *const * | things, | ||
| Bool | ignoreDead, | ||
| Int * | counts, | ||
| Bool | ignoreUnderConstruction = TRUE ) const |
a convenience routine to count the number of owned objects that match a set of ThingTemplates. You input the count and an array of ThingTemplate*, and provide an array of Int of the same size. It fills in the array to the correct counts. This is handy because we must traverse the team's list-of-objects only once.
|
protectedvirtual |
a convenience routine to destroy this team. The team goes through all shutdown stuff. Note that this doesn't actually call deleteInstance, the team will actually be deleted on the next update, if it is a deletable team. IgnoreDead lets you not delete people who are dying anyway. Needed for scripts.
| Bool Team::didAllEnter | ( | PolygonTrigger * | pTrigger, |
| UnsignedInt | whichToConsider ) const |
| Bool Team::didAllExit | ( | PolygonTrigger * | pTrigger, |
| UnsignedInt | whichToConsider ) const |
|
inline |
| Bool Team::didPartialEnter | ( | PolygonTrigger * | pTrigger, |
| UnsignedInt | whichToConsider ) const |
| Bool Team::didPartialExit | ( | PolygonTrigger * | pTrigger, |
| UnsignedInt | whichToConsider ) const |
| void Team::evacuateTeam | ( | void | ) |
| Player * Team::getControllingPlayer | ( | ) | const |
|
inline |
| const Coord3D * Team::getEstimateTeamPosition | ( | void | ) | const |
|
inline |
|
inline |
| Relationship Team::getRelationship | ( | const Team * | that | ) | const |
|
inline |
| Int Team::getTargetableCount | ( | ) | const |
| void Team::getTeamAsAIGroup | ( | AIGroup * | pAIGroup | ) |
| Object * Team::getTeamTargetObject | ( | void | ) |
| Bool Team::hasAnyBuildFacility | ( | void | ) | const |
| Bool Team::hasAnyBuildings | ( | KindOfMaskType | kindOf | ) | const |
a convenience routine to quickly check if any buildings with a specific KindOfType flag are owned.
| Bool Team::hasAnyBuildings | ( | void | ) | const |
| Bool Team::hasAnyObjects | ( | void | ) | const |
| Bool Team::hasAnyUnits | ( | void | ) | const |
| void Team::healAllObjects | ( | void | ) |
|
inline |
| Bool Team::isIdle | ( | void | ) | const |
| void Team::iterateObjects | ( | ObjectIterateFunc | func, |
| void * | userData ) |
| void Team::killTeam | ( | void | ) |
|
protectedvirtual |
| void Team::moveTeamTo | ( | Coord3D | destination | ) |
| Bool Team::noneInside | ( | PolygonTrigger * | pTrigger, |
| UnsignedInt | whichToConsider ) const |
|
inline |
| void Team::setAttackPriorityName | ( | AsciiString | name | ) |
| void Team::setControllingPlayer | ( | Player * | newController | ) |
|
inline |
| void Team::setOverridePlayerRelationship | ( | Int | playerIndex, |
| Relationship | r ) |
set a special relationship between this team and that Player, that overrides the one between our Players. (note that this doesn't imply anything about the relation of that to this.) Note that override-team relationships take precedence over override-player relationships.
| void Team::setOverrideTeamRelationship | ( | TeamID | teamID, |
| Relationship | r ) |
|
inline |
|
inline |
| void Team::setTeamTargetObject | ( | const Object * | target | ) |
| Bool Team::someInsideSomeOutside | ( | PolygonTrigger * | pTrigger, |
| UnsignedInt | whichToConsider ) const |
| void Team::transferUnitsTo | ( | Team * | newTeam | ) |
| Object * Team::tryToRecruit | ( | const ThingTemplate * | tTemplate, |
| const Coord3D * | teamHome, | ||
| Real | maxDist ) |
| Bool Team::unitsEntered | ( | PolygonTrigger * | pTrigger | ) | const |
a convenience routine to quickly check if any objects are in a trigger area.
| void Team::updateGenericScripts | ( | void | ) |
| void Team::updateState | ( | void | ) |
|
protectedvirtual |