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

#include <Object.h>

Inherits Thing, and Snapshot.

Public Member Functions

 Object (const ThingTemplate *thing, const ObjectStatusMaskType &objectStatusMask, Team *team)
 destructor is non-public in order to require the use of TheGameLogic->destroyObject()
 
void initObject ()
 
void onDestroy ()
 run during TheGameLogic::destroyObject
 
ObjectgetNextObject ()
 
const ObjectgetNextObject () const
 
void updateObjValuesFromMapProperties (Dict *properties)
 Brings in properties set in the editor.
 
ObjectID getID () const
 this object's unique ID
 
void friend_bindToDrawable (Drawable *draw)
 set drawable association. for use ONLY by GameLogic!
 
DrawablegetDrawable () const
 drawable (if any) bound to obj
 
ObjectID getProducerID () const
 
void setProducer (const Object *obj)
 
ObjectID getBuilderID () const
 
void setBuilder (const Object *obj)
 
void enterGroup (AIGroup *group)
 become a member of the AIGroup
 
void leaveGroup (void)
 leave our current AIGroup
 
AIGroupgetGroup (void)
 
Bool isMobile () const
 returns true if object is currently able to move
 
Bool isAbleToAttack () const
 returns true if object currently has some kind of attack capability
 
void maskObject (Bool mask)
 mask/unmask object
 
Bool checkAndDetonateBoobyTrap (const Object *victim)
 
Bool isDestroyed () const
 Returns TRUE if object has been destroyed.
 
Bool isAirborneTarget () const
 Our locomotor will control marking us as a valid target for anti air weapons or not.
 
Bool isUsingAirborneLocomotor (void) const
 returns true if the current locomotor is an airborne one
 
void onCapture (Player *oldOwner, Player *newOwner)
 central place for us to put any additional capture logic
 
void onDie (DamageInfo *damageInfo)
 And game death logic. Destroy is deletion of object as code.
 
void attemptDamage (DamageInfo *damageInfo)
 damage object as specified by the info
 
void attemptHealing (Real amount, const Object *source)
 heal object as specified by the info
 
Bool attemptHealingFromSoleBenefactor (Real amount, const Object *source, UnsignedInt duration)
 for the non-stacking healers like ambulance and propaganda
 
ObjectID getSoleHealingBenefactor (void) const
 
Real estimateDamage (DamageInfoInput &damageInfo) const
 
void kill (DamageType damageType=DAMAGE_UNRESISTABLE, DeathType deathType=DEATH_NORMAL)
 kill the object with an optional type of damage and death.
 
void healCompletely ()
 Restore max health to this Object.
 
void notifySubdualDamage (Real amount)
 At this level, we just pass this on to our helper and do a special tint.
 
void doStatusDamage (ObjectStatusTypes status, Real duration)
 At this level, we just pass this on to our helper.
 
void doTempWeaponBonus (WeaponBonusConditionType status, UnsignedInt duration)
 At this level, we just pass this on to our helper.
 
void scoreTheKill (const Object *victim)
 I just killed this object.
 
void onVeterancyLevelChanged (VeterancyLevel oldLevel, VeterancyLevel newLevel, Bool provideFeedback=TRUE)
 I just achieved this level right this moment.
 
ExperienceTrackergetExperienceTracker ()
 
const ExperienceTrackergetExperienceTracker () const
 
VeterancyLevel getVeterancyLevel () const
 
const AsciiStringgetName () const
 
void setName (const AsciiString &newName)
 
TeamgetTeam ()
 
const TeamgetTeam () const
 
void restoreOriginalTeam ()
 
void setTeam (Team *team)
 sets the unit's team AND original team
 
void setTemporaryTeam (Team *team)
 sets the unit's team BUT NOT its original team
 
PlayergetControllingPlayer () const
 
Relationship getRelationship (const Object *that) const
 
Color getIndicatorColor () const
 
Color getNightIndicatorColor () const
 
Bool hasCustomIndicatorColor () const
 
void setCustomIndicatorColor (Color c)
 
void removeCustomIndicatorColor ()
 
Bool isLocallyControlled () const
 
Bool isNeutralControlled () const
 
Bool getIsUndetectedDefector (void) const
 
void friend_setUndetectedDefector (Bool status)
 
Bool isOffMap () const
 
Bool isCaptured () const
 
void setCaptured (Bool isCaptured)
 
const GeometryInfogetGeometryInfo () const
 
void setGeometryInfo (const GeometryInfo &geom)
 
void setGeometryInfoZ (Real newZ)
 
void onCollide (Object *other, const Coord3D *loc, const Coord3D *normal)
 
Real getCarrierDeckHeight () const
 
Bool areModulesReady () const
 
BehaviorModule ** getBehaviorModules () const
 
BodyModuleInterfacegetBodyModule () const
 
ContainModuleInterfacegetContain () const
 
StealthUpdategetStealth () const
 
SpawnBehaviorInterfacegetSpawnBehaviorInterface () const
 
ProjectileUpdateInterfacegetProjectileUpdateInterface () const
 
AIUpdateInterfacegetAIUpdateInterface ()
 
const AIUpdateInterfacegetAIUpdateInterface () const
 
AIUpdateInterfacegetAI ()
 
const AIUpdateInterfacegetAI () const
 
PhysicsBehaviorgetPhysics ()
 
const PhysicsBehaviorgetPhysics () const
 
void topple (const Coord3D *toppleDirection, Real toppleSpeed, UnsignedInt options)
 
UpdateModulefindUpdateModule (NameKeyType key) const
 
DamageModulefindDamageModule (NameKeyType key) const
 
Bool isSalvageCrate () const
 
ProductionUpdateInterfacegetProductionUpdateInterface (void)
 
DockUpdateInterfacegetDockUpdateInterface (void)
 
SpecialPowerModuleInterfacefindSpecialPowerModuleInterface (SpecialPowerType type) const
 
SpecialPowerModuleInterfacefindAnyShortcutSpecialPowerModuleInterface () const
 
SpecialAbilityUpdatefindSpecialAbilityUpdate (SpecialPowerType type) const
 
SpecialPowerCompletionDiefindSpecialPowerCompletionDie () const
 
SpecialPowerUpdateInterfacefindSpecialPowerWithOverridableDestinationActive (SpecialPowerType type=SPECIAL_INVALID) const
 
SpecialPowerUpdateInterfacefindSpecialPowerWithOverridableDestination (SpecialPowerType type=SPECIAL_INVALID) const
 
CountermeasuresBehaviorInterfacegetCountermeasuresBehaviorInterface ()
 
const CountermeasuresBehaviorInterfacegetCountermeasuresBehaviorInterface () const
 
ObjectStatusMaskType getStatusBits () const
 
Bool testStatus (ObjectStatusTypes bit) const
 
void setStatus (ObjectStatusMaskType objectStatus, Bool set=true)
 
void clearStatus (ObjectStatusMaskType objectStatus)
 
void updateUpgradeModules ()
 We need to go through our Upgrade Modules and see which should be activated.
 
UpgradeMaskType getObjectCompletedUpgradeMask () const
 Upgrades I complete locally.
 
void forceRefreshSubObjectUpgradeStatus ()
 
Bool testScriptStatusBit (ObjectScriptStatusBit b) const
 
void setScriptStatus (ObjectScriptStatusBit bit, Bool set=true)
 
void clearScriptStatus (ObjectScriptStatusBit bit)
 
void setSelectable (Bool selectable)
 
Bool isSelectable () const
 
Bool isMassSelectable () const
 
void setFormationID (enum FormationID id)
 
enum FormationID getFormationID (void) const
 
void setFormationOffset (const Coord2D &offset)
 
void getFormationOffset (Coord2D *offset) const
 
void getHealthBoxPosition (Coord3D &pos) const
 
Bool getHealthBoxDimensions (Real &healthBoxHeight, Real &healthBoxWidth) const
 
Bool isEffectivelyDead () const
 
void setEffectivelyDead (Bool dead)
 
void markSingleUseCommandUsed ()
 
Bool hasSingleUseCommandBeenUsed () const
 
Bool canCrushOrSquish (Object *otherObj, CrushSquishTestType testType=TEST_CRUSH_OR_SQUISH) const
 returns true iff the object can run over the other object.
 
UnsignedByte getCrusherLevel () const
 
UnsignedByte getCrushableLevel () const
 
Bool hasUpgrade (const UpgradeTemplate *upgradeT) const
 does this object already have this upgrade
 
Bool affectedByUpgrade (const UpgradeTemplate *upgradeT) const
 can the object even "have" this upgrade, will it do something?
 
void giveUpgrade (const UpgradeTemplate *upgradeT)
 give upgrade to this object
 
void removeUpgrade (const UpgradeTemplate *upgradeT)
 remove upgrade from this object
 
Bool hasCountermeasures () const
 
void reportMissileForCountermeasures (Object *missile)
 
ObjectID calculateCountermeasureToDivertTo (const Object &victim)
 
void calcNaturalRallyPoint (Coord2D *pt)
 calc the "natural" starting rally point
 
void setConstructionPercent (Real percent)
 
Real getConstructionPercent () const
 
void setLayer (PathfindLayerEnum layer)
 
PathfindLayerEnum getLayer () const
 
void setDestinationLayer (PathfindLayerEnum layer)
 
PathfindLayerEnum getDestinationLayer () const
 
void prependToList (Object **pListHead)
 
void removeFromList (Object **pListHead)
 
Bool isInList (Object **pListHead) const
 
void friend_deleteInstance ()
 
void friend_setPartitionData (PartitionData *pd)
 cache the partition module (should be called only by PartitionData)
 
PartitionDatafriend_getPartitionData () const
 
const PartitionDatafriend_getConstPartitionData () const
 
void onPartitionCellChange ()
 We have moved a 'significant' amount, so do maintenence that can be considered 'cell-based'.
 
void handlePartitionCellMaintenance ()
 Undo and redo all shroud actions. Call when something has changed, like position or ownership or Death.
 
Real getVisionRange () const
 How far can you see? This is dynamic so it is in Object.
 
void setVisionRange (Real newVisionRange)
 Access to setting someone's Vision distance.
 
Real getShroudRange () const
 How far can you shroud? Even more dynamic since it'll start at zero for everyone.
 
void setShroudRange (Real newShroudRange)
 Access to setting someone's shrouding distance.
 
Real getShroudClearingRange () const
 How far do you clear shroud?
 
void setShroudClearingRange (Real newShroudClearingRange)
 Access to setting someone's clear shroud distance.
 
void setVisionSpied (Bool setting, Int byWhom)
 Change who is looking through our eyes.
 
void friend_prepareForMapBoundaryAdjust (void)
 
void friend_notifyOfNewMapBoundary (void)
 
void friend_setRadarData (RadarObject *rd)
 
RadarObjectfriend_getRadarData ()
 
RadarPriorityType getRadarPriority () const
 
ObjectgetContainedBy ()
 
const ObjectgetContainedBy () const
 
UnsignedInt getContainedByFrame () const
 
Bool isContained () const
 
void onContainedBy (Object *containedBy)
 this object now contained in "containedBy"
 
void onRemovedFrom (Object *removedFrom)
 this object no longer contained in "containedBy"
 
Int getTransportSlotCount () const
 
void friend_setContainedBy (Object *containedBy)
 
SpecialPowerModuleInterfacegetSpecialPowerModule (const SpecialPowerTemplate *specialPowerTemplate) const
 
void doSpecialPower (const SpecialPowerTemplate *specialPowerTemplate, UnsignedInt commandOptions, Bool forced=false)
 execute power
 
void doSpecialPowerAtObject (const SpecialPowerTemplate *specialPowerTemplate, Object *obj, UnsignedInt commandOptions, Bool forced=false)
 execute power
 
void doSpecialPowerAtLocation (const SpecialPowerTemplate *specialPowerTemplate, const Coord3D *loc, Real angle, UnsignedInt commandOptions, Bool forced=false)
 execute power
 
void doSpecialPowerUsingWaypoints (const SpecialPowerTemplate *specialPowerTemplate, const Waypoint *way, UnsignedInt commandOptions, Bool forced=false)
 execute power
 
void doCommandButton (const CommandButton *commandButton, CommandSourceType cmdSource)
 
void doCommandButtonAtObject (const CommandButton *commandButton, Object *obj, CommandSourceType cmdSource)
 
void doCommandButtonAtPosition (const CommandButton *commandButton, const Coord3D *pos, CommandSourceType cmdSource)
 
void doCommandButtonUsingWaypoints (const CommandButton *commandButton, const Waypoint *way, CommandSourceType cmdSource)
 
const AsciiStringgetCommandSetString () const
 
void setCommandSetStringOverride (AsciiString newCommandSetString)
 
Bool canProduceUpgrade (const UpgradeTemplate *upgrade)
 People are faking their commandsets, and, Surprise!, they are authoritative. Challenge everything.
 
void reloadAllAmmo (Bool now)
 
Bool isOutOfAmmo () const
 
Bool hasAnyWeapon () const
 
Bool hasAnyDamageWeapon () const
 
Bool hasWeaponToDealDamageType (DamageType typeToDeal) const
 
Real getLargestWeaponRange () const
 
UnsignedInt getMostPercentReadyToFireAnyWeapon () const
 
WeapongetWeaponInWeaponSlot (WeaponSlotType wslot) const
 
UnsignedInt getWeaponInWeaponSlotCommandSourceMask (WeaponSlotType wSlot) const
 
const Bool isReloadTimeShared () const
 
WeapongetCurrentWeapon (WeaponSlotType *wslot=NULL)
 
const WeapongetCurrentWeapon (WeaponSlotType *wslot=NULL) const
 
void setFiringConditionForCurrentWeapon () const
 
void adjustModelConditionForWeaponStatus ()
 Check to see if I should change my model condition.
 
void fireCurrentWeapon (Object *target)
 
void fireCurrentWeapon (const Coord3D *pos)
 
void preFireCurrentWeapon (const Object *victim)
 
UnsignedInt getLastShotFiredFrame () const
 Get the frame a shot was last fired on.
 
ObjectID getLastVictimID () const
 Get the last victim we shot at.
 
WeaponfindWaypointFollowingCapableWeapon ()
 
Bool getAmmoPipShowingInfo (Int &numTotal, Int &numFull) const
 
void notifyFiringTrackerShotFired (const Weapon *weaponFired, ObjectID victimID)
 
CanAttackResult getAbleToAttackSpecificObject (AbleToAttackType t, const Object *target, CommandSourceType commandSource, WeaponSlotType specificSlot=(WeaponSlotType) -1) const
 
CanAttackResult getAbleToUseWeaponAgainstTarget (AbleToAttackType attackType, const Object *victim, const Coord3D *pos, CommandSourceType commandSource, WeaponSlotType specificSlot=(WeaponSlotType) -1) const
 
Bool chooseBestWeaponForTarget (const Object *target, WeaponChoiceCriteria criteria, CommandSourceType cmdSource)
 
void setModelConditionState (ModelConditionFlagType a)
 
void clearModelConditionState (ModelConditionFlagType a)
 
void clearAndSetModelConditionState (ModelConditionFlagType clr, ModelConditionFlagType set)
 
void setSpecialModelConditionState (ModelConditionFlagType set, UnsignedInt frames=0)
 
void clearSpecialModelConditionStates ()
 
void clearModelConditionFlags (const ModelConditionFlags &clr)
 
void setModelConditionFlags (const ModelConditionFlags &set)
 
void clearAndSetModelConditionFlags (const ModelConditionFlags &clr, const ModelConditionFlags &set)
 
void setWeaponSetFlag (WeaponSetType wst)
 
void clearWeaponSetFlag (WeaponSetType wst)
 
Bool testWeaponSetFlag (WeaponSetType wst) const
 
const WeaponSetFlagsgetWeaponSetFlags () const
 
Bool setWeaponLock (WeaponSlotType weaponSlot, WeaponLockType lockType)
 
void releaseWeaponLock (WeaponLockType lockType)
 
Bool isCurWeaponLocked () const
 
void setArmorSetFlag (ArmorSetType ast)
 
void clearArmorSetFlag (ArmorSetType ast)
 
Bool testArmorSetFlag (ArmorSetType ast) const
 
Bool hasSpecialPower (SpecialPowerType type) const
 return true if the template has the specified special power flag set
 
Bool hasAnySpecialPower () const
 
void setWeaponBonusCondition (WeaponBonusConditionType wst)
 
void clearWeaponBonusCondition (WeaponBonusConditionType wst)
 
Bool testWeaponBonusCondition (WeaponBonusConditionType wst) const
 
WeaponBonusConditionFlags getWeaponBonusCondition () const
 
Bool getSingleLogicalBonePosition (const char *boneName, Coord3D *position, Matrix3D *transform) const
 
Bool getSingleLogicalBonePositionOnTurret (WhichTurretType whichTurret, const char *boneName, Coord3D *position, Matrix3D *transform) const
 
Int getMultiLogicalBonePosition (const char *boneNamePrefix, Int maxBones, Coord3D *positions, Matrix3D *transforms, Bool convertToWorld=TRUE) const
 
Bool didEnter (const PolygonTrigger *pTrigger) const
 
Bool didExit (const PolygonTrigger *pTrigger) const
 
Bool isInside (const PolygonTrigger *pTrigger) const
 
ExitInterfacegetObjectExitInterface () const
 get exit interface is present
 
Bool hasExitInterface () const
 
ObjectShroudStatus getShroudedStatus (Int playerIndex) const
 
DisabledMaskType getDisabledFlags () const
 
Bool isDisabled () const
 
Bool clearDisabled (DisabledType type)
 
void setDisabled (DisabledType type)
 
void setDisabledUntil (DisabledType type, UnsignedInt frame)
 
Bool isDisabledByType (DisabledType type) const
 
UnsignedInt getDisabledUntil (DisabledType type=DISABLED_ANY) const
 
void pauseAllSpecialPowers (const Bool disabling) const
 
void checkDisabledStatus ()
 
void clearLeechRangeModeForAllWeapons ()
 
Int getNumConsecutiveShotsFiredAtTarget (const Object *victim) const
 
void setHealthBoxOffset (const Coord3D &offset)
 for special amorphous like angry mob
 
void defect (Team *newTeam, UnsignedInt detectionTime)
 
void goInvulnerable (UnsignedInt time)
 
virtual void reactToTurretChange (WhichTurretType turret, Real oldRotation, Real oldPitch)
 
Bool isStructure (void) const
 
Bool isFactionStructure (void) const
 
Bool isNonFactionStructure (void) const
 
Bool isHero (void) const
 
Bool getReceivingDifficultyBonus () const
 
void setReceivingDifficultyBonus (Bool receive)
 
UnsignedInt getSafeOcclusionFrame (void)
 
void setSafeOcclusionFrame (UnsignedInt frame)
 
void friend_adjustPowerForPlayer (Bool incoming)
 
- Public Member Functions inherited from Thing
 Thing (const ThingTemplate *thingTemplate)
 
const ThingTemplategetTemplate () const
 
Bool isKindOf (KindOfType t) const
 
Bool isKindOfMulti (const KindOfMaskType &mustBeSet, const KindOfMaskType &mustBeClear) const
 
Bool isAnyKindOf (const KindOfMaskType &anyKindOf) const
 
void setPosition (const Coord3D *pos)
 
void setPositionZ (Real z)
 the nice thing about this is that we don't have to recalc out cached terrain stuff.
 
void setOrientation (Real angle)
 
const Coord3DgetPosition () const
 
Real getOrientation () const
 
const Coord3DgetUnitDirectionVector2D () const
 
void getUnitDirectionVector2D (Coord3D &dir) const
 
void getUnitDirectionVector3D (Coord3D &dir) const
 
Real getHeightAboveTerrain () const
 
Real getHeightAboveTerrainOrWater () const
 
Bool isAboveTerrain () const
 
Bool isAboveTerrainOrWater () const
 
Bool isSignificantlyAboveTerrain () const
 
void convertBonePosToWorldPos (const Coord3D *bonePos, const Matrix3D *boneTransform, Coord3D *worldPos, Matrix3D *worldTransform) const
 
void setTransformMatrix (const Matrix3D *mx)
 set the world transformation matrix
 
const Matrix3DgetTransformMatrix () const
 return the world transformation matrix
 
void transformPoint (const Coord3D *in, Coord3D *out)
 transform this point using the m_transform matrix of this thing
 
- Public Member Functions inherited from MemoryPoolObject
void deleteInstance ()
 
- Public Member Functions inherited from Snapshot
 Snapshot (void)
 
 ~Snapshot (void)
 

Protected Member Functions

void setOrRestoreTeam (Team *team, Bool restoring)
 
void onDisabledEdge (Bool becomingDisabled)
 
void crc (Xfer *xfer)
 
void xfer (Xfer *xfer)
 
void loadPostProcess ()
 
void handleShroud ()
 
void handleValueMap ()
 
void handleThreatMap ()
 
ModulefindModule (NameKeyType key) const
 
Bool didEnterOrExit () const
 
void setID (ObjectID id)
 
virtual ObjectasObjectMeth ()
 
virtual const ObjectasObjectMeth () const
 
virtual Real calculateHeightAboveTerrain (void) const
 
void updateTriggerAreaFlags (void)
 
void setTriggerAreaFlagsForChangeInPosition (void)
 
void look ()
 Look and unlook are protected. They should be called from Object::reasonToLook. Like Capture, or death.
 
void unlook ()
 
void shroud ()
 
void unshroud ()
 
void addValue ()
 value and threat functions are protected, and should only be called from handleValueMap
 
void removeValue ()
 
void addThreat ()
 
void removeThreat ()
 
virtual void reactToTransformChange (const Matrix3D *oldMtx, const Coord3D *oldPos, Real oldAngle)
 
- Protected Member Functions inherited from Thing
virtual DrawableasDrawableMeth ()
 
virtual const DrawableasDrawableMeth () const
 
- Protected Member Functions inherited from MemoryPoolObject
virtual ~MemoryPoolObject ()
 
void * operator new (size_t s)
 
void operator delete (void *p)
 
virtual MemoryPoolgetObjectMemoryPool ()=0
 

Detailed Description

Object definition. Objects are manipulated via TheGameLogic singleton.

Todo
Create an ObjectInterface class.

Definition at line 163 of file Object.h.

Constructor & Destructor Documentation

◆ Object()

Object::Object ( const ThingTemplate * thing,
const ObjectStatusMaskType & objectStatusMask,
Team * team )

destructor is non-public in order to require the use of TheGameLogic->destroyObject()

Object constructor automatically attaches all objects to "TheGameLogic"

Todo
srj – figure out how to create this only on demand. currently we don't have a good way to add/remove update modules from an object on-the-fly, so we fake it here, and just skip the creation if it is impossible for this object to ever defect...

allow for inter-Module resolution

< who is the only other object that can give me this non-stacking heal benefit?

< on what frame can I accept healing (thus to switch) from a new benefactor

Definition at line 184 of file Object.cpp.

Member Function Documentation

◆ addThreat()

void Object::addThreat ( )
protected

Definition at line 4881 of file Object.cpp.

◆ addValue()

void Object::addValue ( )
protected

value and threat functions are protected, and should only be called from handleValueMap

Definition at line 4831 of file Object.cpp.

◆ adjustModelConditionForWeaponStatus()

void Object::adjustModelConditionForWeaponStatus ( )

Check to see if I should change my model condition.

A weapon cannot be in charge of maintaining condition flags as it is all event driven. I will maintain my ModelCondition myself if it should change. Firing is set by firing logic, so I don't include it here. It is only the states that expire on timers that noone watches that I am concerned with.

Definition at line 4707 of file Object.cpp.

◆ affectedByUpgrade()

Bool Object::affectedByUpgrade ( const UpgradeTemplate * upgradeT) const

can the object even "have" this upgrade, will it do something?

Is this object capable of having this upgrade

Definition at line 4468 of file Object.cpp.

◆ areModulesReady()

Bool Object::areModulesReady ( ) const
inline

Definition at line 286 of file Object.h.

◆ asObjectMeth() [1/2]

virtual Object * Object::asObjectMeth ( )
inlineprotectedvirtual

Reimplemented from Thing.

Definition at line 660 of file Object.h.

◆ asObjectMeth() [2/2]

virtual const Object * Object::asObjectMeth ( ) const
inlineprotectedvirtual

Reimplemented from Thing.

Definition at line 661 of file Object.h.

◆ attemptDamage()

void Object::attemptDamage ( DamageInfo * damageInfo)

damage object as specified by the info

Something is attempting to damage this object

Todo
track damage dealt/attempted

Definition at line 1818 of file Object.cpp.

◆ attemptHealing()

void Object::attemptHealing ( Real amount,
const Object * source )

heal object as specified by the info

Definition at line 1883 of file Object.cpp.

◆ attemptHealingFromSoleBenefactor()

Bool Object::attemptHealingFromSoleBenefactor ( Real amount,
const Object * source,
UnsignedInt duration )

for the non-stacking healers like ambulance and propaganda

< for the non-stacking healers like ambulance and propaganda

Definition at line 1907 of file Object.cpp.

◆ calcNaturalRallyPoint()

void Object::calcNaturalRallyPoint ( Coord2D * pt)

calc the "natural" starting rally point

Definition at line 2843 of file Object.cpp.

◆ calculateCountermeasureToDivertTo()

ObjectID Object::calculateCountermeasureToDivertTo ( const Object & victim)

Definition at line 6405 of file Object.cpp.

◆ calculateHeightAboveTerrain()

Real Object::calculateHeightAboveTerrain ( void ) const
protectedvirtual

Reimplemented from Thing.

Definition at line 2775 of file Object.cpp.

◆ canCrushOrSquish()

Bool Object::canCrushOrSquish ( Object * otherObj,
CrushSquishTestType testType = TEST_CRUSH_OR_SQUISH ) const

returns true iff the object can run over the other object.

Definition at line 1100 of file Object.cpp.

◆ canProduceUpgrade()

Bool Object::canProduceUpgrade ( const UpgradeTemplate * upgrade)

People are faking their commandsets, and, Surprise!, they are authoritative. Challenge everything.

Definition at line 6117 of file Object.cpp.

◆ checkAndDetonateBoobyTrap()

Bool Object::checkAndDetonateBoobyTrap ( const Object * victim)

Booby traps are set off by many random actions, so those actions are responsible for calling this. Return value is if a booby trap was set off, so caller can react. Those actions are: planting any type of bomb, entering, starting to capture, dying.

Definition at line 934 of file Object.cpp.

◆ checkDisabledStatus()

void Object::checkDisabledStatus ( )

Definition at line 2341 of file Object.cpp.

◆ chooseBestWeaponForTarget()

Bool Object::chooseBestWeaponForTarget ( const Object * target,
WeaponChoiceCriteria criteria,
CommandSourceType cmdSource )

Selects the best weapon for the given target, and sets it as the current weapon. If there is no weapon that can damage the target, false is returned (and the current-weapon is unchanged). Note that this DOES take weapon attack range into account.

Definition at line 1468 of file Object.cpp.

◆ clearAndSetModelConditionFlags()

void Object::clearAndSetModelConditionFlags ( const ModelConditionFlags & clr,
const ModelConditionFlags & set )

Definition at line 1344 of file Object.cpp.

◆ clearAndSetModelConditionState()

void Object::clearAndSetModelConditionState ( ModelConditionFlagType clr,
ModelConditionFlagType set )

Definition at line 1317 of file Object.cpp.

◆ clearArmorSetFlag()

void Object::clearArmorSetFlag ( ArmorSetType ast)

Definition at line 1217 of file Object.cpp.

◆ clearDisabled()

Bool Object::clearDisabled ( DisabledType type)

Definition at line 2240 of file Object.cpp.

◆ clearLeechRangeModeForAllWeapons()

void Object::clearLeechRangeModeForAllWeapons ( )

Definition at line 5827 of file Object.cpp.

◆ clearModelConditionFlags()

void Object::clearModelConditionFlags ( const ModelConditionFlags & clr)

Definition at line 1326 of file Object.cpp.

◆ clearModelConditionState()

void Object::clearModelConditionState ( ModelConditionFlagType a)

Definition at line 1308 of file Object.cpp.

◆ clearScriptStatus()

void Object::clearScriptStatus ( ObjectScriptStatusBit bit)
inline

Definition at line 354 of file Object.h.

◆ clearSpecialModelConditionStates()

void Object::clearSpecialModelConditionStates ( )

Definition at line 1374 of file Object.cpp.

◆ clearStatus()

void Object::clearStatus ( ObjectStatusMaskType objectStatus)
inline

Definition at line 339 of file Object.h.

◆ clearWeaponBonusCondition()

void Object::clearWeaponBonusCondition ( WeaponBonusConditionType wst)

Definition at line 4687 of file Object.cpp.

◆ clearWeaponSetFlag()

void Object::clearWeaponSetFlag ( WeaponSetType wst)

Definition at line 3065 of file Object.cpp.

◆ crc()

void Object::crc ( Xfer * xfer)
protectedvirtual

Object CRC implemtation

Implements Snapshot.

Definition at line 3885 of file Object.cpp.

◆ defect()

void Object::defect ( Team * newTeam,
UnsignedInt detectionTime )

Definition at line 6135 of file Object.cpp.

◆ didEnter()

Bool Object::didEnter ( const PolygonTrigger * pTrigger) const

Returns whether an object entered an area.

Definition at line 2509 of file Object.cpp.

◆ didEnterOrExit()

Bool Object::didEnterOrExit ( ) const
protected

Returns whether an object entered or exited an area.

Definition at line 2491 of file Object.cpp.

◆ didExit()

Bool Object::didExit ( const PolygonTrigger * pTrigger) const

Returns whether an object entered an area.

Definition at line 2527 of file Object.cpp.

◆ doCommandButton()

void Object::doCommandButton ( const CommandButton * commandButton,
CommandSourceType cmdSource )

Execute command button ability

Definition at line 5419 of file Object.cpp.

◆ doCommandButtonAtObject()

void Object::doCommandButtonAtObject ( const CommandButton * commandButton,
Object * obj,
CommandSourceType cmdSource )

Execute command button ability directed at an object target

Definition at line 5548 of file Object.cpp.

◆ doCommandButtonAtPosition()

void Object::doCommandButtonAtPosition ( const CommandButton * commandButton,
const Coord3D * pos,
CommandSourceType cmdSource )

Execute command button ability directed at a location

Definition at line 5663 of file Object.cpp.

◆ doCommandButtonUsingWaypoints()

void Object::doCommandButtonUsingWaypoints ( const CommandButton * commandButton,
const Waypoint * way,
CommandSourceType cmdSource )

Execute command button ability directed at a location

Definition at line 5761 of file Object.cpp.

◆ doSpecialPower()

void Object::doSpecialPower ( const SpecialPowerTemplate * specialPowerTemplate,
UnsignedInt commandOptions,
Bool forced = false )

execute power

Execute special power

Definition at line 5339 of file Object.cpp.

◆ doSpecialPowerAtLocation()

void Object::doSpecialPowerAtLocation ( const SpecialPowerTemplate * specialPowerTemplate,
const Coord3D * loc,
Real angle,
UnsignedInt commandOptions,
Bool forced = false )

execute power

Execute special power

Definition at line 5378 of file Object.cpp.

◆ doSpecialPowerAtObject()

void Object::doSpecialPowerAtObject ( const SpecialPowerTemplate * specialPowerTemplate,
Object * obj,
UnsignedInt commandOptions,
Bool forced = false )

execute power

Execute special power

Definition at line 5359 of file Object.cpp.

◆ doSpecialPowerUsingWaypoints()

void Object::doSpecialPowerUsingWaypoints ( const SpecialPowerTemplate * specialPowerTemplate,
const Waypoint * way,
UnsignedInt commandOptions,
Bool forced = false )

execute power

Execute special power

Definition at line 5399 of file Object.cpp.

◆ doStatusDamage()

void Object::doStatusDamage ( ObjectStatusTypes status,
Real duration )

At this level, we just pass this on to our helper.

Definition at line 5281 of file Object.cpp.

◆ doTempWeaponBonus()

void Object::doTempWeaponBonus ( WeaponBonusConditionType status,
UnsignedInt duration )

At this level, we just pass this on to our helper.

Definition at line 5288 of file Object.cpp.

◆ enterGroup()

void Object::enterGroup ( AIGroup * group)

become a member of the AIGroup

Definition at line 6310 of file Object.cpp.

◆ estimateDamage()

Real Object::estimateDamage ( DamageInfoInput & damageInfo) const

Definition at line 1942 of file Object.cpp.

◆ findAnyShortcutSpecialPowerModuleInterface()

SpecialPowerModuleInterface * Object::findAnyShortcutSpecialPowerModuleInterface ( ) const

Definition at line 5892 of file Object.cpp.

◆ findDamageModule()

DamageModule * Object::findDamageModule ( NameKeyType key) const
inline

Definition at line 309 of file Object.h.

◆ findModule()

Module * Object::findModule ( NameKeyType key) const
protected

Definition at line 2871 of file Object.cpp.

◆ findSpecialAbilityUpdate()

SpecialAbilityUpdate * Object::findSpecialAbilityUpdate ( SpecialPowerType type) const

Definition at line 5981 of file Object.cpp.

◆ findSpecialPowerCompletionDie()

SpecialPowerCompletionDie * Object::findSpecialPowerCompletionDie ( ) const

Definition at line 6000 of file Object.cpp.

◆ findSpecialPowerModuleInterface()

SpecialPowerModuleInterface * Object::findSpecialPowerModuleInterface ( SpecialPowerType type) const

Definition at line 5872 of file Object.cpp.

◆ findSpecialPowerWithOverridableDestination()

SpecialPowerUpdateInterface * Object::findSpecialPowerWithOverridableDestination ( SpecialPowerType type = SPECIAL_INVALID) const

Definition at line 5961 of file Object.cpp.

◆ findSpecialPowerWithOverridableDestinationActive()

SpecialPowerUpdateInterface * Object::findSpecialPowerWithOverridableDestinationActive ( SpecialPowerType type = SPECIAL_INVALID) const

Definition at line 5942 of file Object.cpp.

◆ findUpdateModule()

UpdateModule * Object::findUpdateModule ( NameKeyType key) const
inline

Definition at line 308 of file Object.h.

◆ findWaypointFollowingCapableWeapon()

Weapon * Object::findWaypointFollowingCapableWeapon ( )

Definition at line 1419 of file Object.cpp.

◆ fireCurrentWeapon() [1/2]

void Object::fireCurrentWeapon ( const Coord3D * pos)

Definition at line 1498 of file Object.cpp.

◆ fireCurrentWeapon() [2/2]

void Object::fireCurrentWeapon ( Object * target)

Definition at line 1475 of file Object.cpp.

◆ forceRefreshSubObjectUpgradeStatus()

void Object::forceRefreshSubObjectUpgradeStatus ( )

Definition at line 2473 of file Object.cpp.

◆ friend_adjustPowerForPlayer()

void Object::friend_adjustPowerForPlayer ( Bool incoming)

Definition at line 3794 of file Object.cpp.

◆ friend_bindToDrawable()

void Object::friend_bindToDrawable ( Drawable * draw)

set drawable association. for use ONLY by GameLogic!

Definition at line 2975 of file Object.cpp.

◆ friend_deleteInstance()

void Object::friend_deleteInstance ( )
inline

Definition at line 414 of file Object.h.

◆ friend_getConstPartitionData()

const PartitionData * Object::friend_getConstPartitionData ( ) const
inline

Definition at line 419 of file Object.h.

◆ friend_getPartitionData()

PartitionData * Object::friend_getPartitionData ( ) const
inline

Definition at line 418 of file Object.h.

◆ friend_getRadarData()

RadarObject * Object::friend_getRadarData ( )
inline

Definition at line 438 of file Object.h.

◆ friend_notifyOfNewMapBoundary()

void Object::friend_notifyOfNewMapBoundary ( void )

Definition at line 2823 of file Object.cpp.

◆ friend_prepareForMapBoundaryAdjust()

void Object::friend_prepareForMapBoundaryAdjust ( void )

Definition at line 2801 of file Object.cpp.

◆ friend_setContainedBy()

void Object::friend_setContainedBy ( Object * containedBy)
inline

Definition at line 449 of file Object.h.

◆ friend_setPartitionData()

void Object::friend_setPartitionData ( PartitionData * pd)
inline

cache the partition module (should be called only by PartitionData)

Definition at line 417 of file Object.h.

◆ friend_setRadarData()

void Object::friend_setRadarData ( RadarObject * rd)
inline

Definition at line 437 of file Object.h.

◆ friend_setUndetectedDefector()

void Object::friend_setUndetectedDefector ( Bool status)

Definition at line 798 of file Object.cpp.

◆ getAbleToAttackSpecificObject()

CanAttackResult Object::getAbleToAttackSpecificObject ( AbleToAttackType t,
const Object * target,
CommandSourceType commandSource,
WeaponSlotType specificSlot = (WeaponSlotType)-1 ) const

Determines if the unit has any weapon that could conceivably harm the victim. this does not take range, ammo, etc. into account, but immutable weapon properties, such as "can you target airborne victims".

Definition at line 1448 of file Object.cpp.

◆ getAbleToUseWeaponAgainstTarget()

CanAttackResult Object::getAbleToUseWeaponAgainstTarget ( AbleToAttackType attackType,
const Object * victim,
const Coord3D * pos,
CommandSourceType commandSource,
WeaponSlotType specificSlot = (WeaponSlotType)-1 ) const

Definition at line 1461 of file Object.cpp.

◆ getAI() [1/2]

AIUpdateInterface * Object::getAI ( )
inline

Definition at line 301 of file Object.h.

◆ getAI() [2/2]

const AIUpdateInterface * Object::getAI ( ) const
inline

Definition at line 302 of file Object.h.

◆ getAIUpdateInterface() [1/2]

AIUpdateInterface * Object::getAIUpdateInterface ( )
inline

Definition at line 298 of file Object.h.

◆ getAIUpdateInterface() [2/2]

const AIUpdateInterface * Object::getAIUpdateInterface ( ) const
inline

Definition at line 299 of file Object.h.

◆ getAmmoPipShowingInfo()

Bool Object::getAmmoPipShowingInfo ( Int & numTotal,
Int & numFull ) const
Todo
srj – may need to cache this inside weaponset.

Definition at line 1425 of file Object.cpp.

◆ getBehaviorModules()

BehaviorModule ** Object::getBehaviorModules ( ) const
inline

Definition at line 288 of file Object.h.

◆ getBodyModule()

BodyModuleInterface * Object::getBodyModule ( ) const
inline

Definition at line 290 of file Object.h.

◆ getBuilderID()

ObjectID Object::getBuilderID ( ) const
inline

Definition at line 192 of file Object.h.

◆ getCarrierDeckHeight()

Real Object::getCarrierDeckHeight ( ) const

Definition at line 6334 of file Object.cpp.

◆ getCommandSetString()

const AsciiString & Object::getCommandSetString ( ) const

For Object specific dynamic command sets. Different from the Science specific ones handled in ThingTemplate

Definition at line 6108 of file Object.cpp.

◆ getConstructionPercent()

Real Object::getConstructionPercent ( ) const
inline

Definition at line 401 of file Object.h.

◆ getContain()

ContainModuleInterface * Object::getContain ( ) const
inline

Definition at line 291 of file Object.h.

◆ getContainedBy() [1/2]

Object * Object::getContainedBy ( )
inline

Definition at line 442 of file Object.h.

◆ getContainedBy() [2/2]

const Object * Object::getContainedBy ( ) const
inline

Definition at line 443 of file Object.h.

◆ getContainedByFrame()

UnsignedInt Object::getContainedByFrame ( ) const
inline

Definition at line 444 of file Object.h.

◆ getControllingPlayer()

Player * Object::getControllingPlayer ( ) const

Definition at line 1599 of file Object.cpp.

◆ getCountermeasuresBehaviorInterface() [1/2]

CountermeasuresBehaviorInterface * Object::getCountermeasuresBehaviorInterface ( )

Definition at line 6353 of file Object.cpp.

◆ getCountermeasuresBehaviorInterface() [2/2]

const CountermeasuresBehaviorInterface * Object::getCountermeasuresBehaviorInterface ( ) const

Definition at line 6367 of file Object.cpp.

◆ getCrushableLevel()

UnsignedByte Object::getCrushableLevel ( ) const

Definition at line 1186 of file Object.cpp.

◆ getCrusherLevel()

UnsignedByte Object::getCrusherLevel ( ) const

Definition at line 1180 of file Object.cpp.

◆ getCurrentWeapon() [1/2]

Weapon * Object::getCurrentWeapon ( WeaponSlotType * wslot = NULL)

Definition at line 1397 of file Object.cpp.

◆ getCurrentWeapon() [2/2]

const Weapon * Object::getCurrentWeapon ( WeaponSlotType * wslot = NULL) const

Definition at line 1408 of file Object.cpp.

◆ getDestinationLayer()

PathfindLayerEnum Object::getDestinationLayer ( ) const
inline

Definition at line 407 of file Object.h.

◆ getDisabledFlags()

DisabledMaskType Object::getDisabledFlags ( ) const
inline

Definition at line 582 of file Object.h.

◆ getDisabledUntil()

UnsignedInt Object::getDisabledUntil ( DisabledType type = DISABLED_ANY) const

Definition at line 2215 of file Object.cpp.

◆ getDockUpdateInterface()

DockUpdateInterface * Object::getDockUpdateInterface ( void )

Definition at line 5855 of file Object.cpp.

◆ getDrawable()

Drawable * Object::getDrawable ( ) const
inline

drawable (if any) bound to obj

Definition at line 187 of file Object.h.

◆ getExperienceTracker() [1/2]

ExperienceTracker * Object::getExperienceTracker ( )
inline

Definition at line 238 of file Object.h.

◆ getExperienceTracker() [2/2]

const ExperienceTracker * Object::getExperienceTracker ( ) const
inline

Definition at line 239 of file Object.h.

◆ getFormationID()

enum FormationID Object::getFormationID ( void ) const
inline

Definition at line 367 of file Object.h.

◆ getFormationOffset()

void Object::getFormationOffset ( Coord2D * offset) const
inline

Definition at line 369 of file Object.h.

◆ getGeometryInfo()

const GeometryInfo & Object::getGeometryInfo ( ) const
inline

Definition at line 273 of file Object.h.

◆ getGroup()

AIGroup * Object::getGroup ( void )

Definition at line 6304 of file Object.cpp.

◆ getHealthBoxDimensions()

Bool Object::getHealthBoxDimensions ( Real & healthBoxHeight,
Real & healthBoxWidth ) const

Definition at line 3388 of file Object.cpp.

◆ getHealthBoxPosition()

void Object::getHealthBoxPosition ( Coord3D & pos) const

Definition at line 3370 of file Object.cpp.

◆ getID()

ObjectID Object::getID ( ) const
inline

this object's unique ID

Definition at line 185 of file Object.h.

◆ getIndicatorColor()

Color Object::getIndicatorColor ( ) const

Definition at line 1645 of file Object.cpp.

◆ getIsUndetectedDefector()

Bool Object::getIsUndetectedDefector ( void ) const
inline

Definition at line 265 of file Object.h.

◆ getLargestWeaponRange()

Real Object::getLargestWeaponRange ( ) const

Definition at line 1270 of file Object.cpp.

◆ getLastShotFiredFrame()

UnsignedInt Object::getLastShotFiredFrame ( ) const

Get the frame a shot was last fired on.

Using the firing tracker, return the frame a shot was last fired on

Definition at line 1545 of file Object.cpp.

◆ getLastVictimID()

ObjectID Object::getLastVictimID ( ) const

Get the last victim we shot at.

Get the victim ID we last shot at

Definition at line 1564 of file Object.cpp.

◆ getLayer()

PathfindLayerEnum Object::getLayer ( ) const
inline

Definition at line 404 of file Object.h.

◆ getMostPercentReadyToFireAnyWeapon()

UnsignedInt Object::getMostPercentReadyToFireAnyWeapon ( ) const

Definition at line 1258 of file Object.cpp.

◆ getMultiLogicalBonePosition()

Int Object::getMultiLogicalBonePosition ( const char * boneNamePrefix,
Int maxBones,
Coord3D * positions,
Matrix3D * transforms,
Bool convertToWorld = TRUE ) const

Definition at line 6087 of file Object.cpp.

◆ getName()

const AsciiString & Object::getName ( ) const
inline

Definition at line 242 of file Object.h.

◆ getNextObject() [1/2]

Object * Object::getNextObject ( )
inline

Definition at line 179 of file Object.h.

◆ getNextObject() [2/2]

const Object * Object::getNextObject ( ) const
inline

Definition at line 180 of file Object.h.

◆ getNightIndicatorColor()

Color Object::getNightIndicatorColor ( ) const

Definition at line 1669 of file Object.cpp.

◆ getNumConsecutiveShotsFiredAtTarget()

Int Object::getNumConsecutiveShotsFiredAtTarget ( const Object * victim) const

Definition at line 6007 of file Object.cpp.

◆ getObjectCompletedUpgradeMask()

UpgradeMaskType Object::getObjectCompletedUpgradeMask ( ) const
inline

Upgrades I complete locally.

Definition at line 341 of file Object.h.

◆ getObjectExitInterface()

ExitInterface * Object::getObjectExitInterface ( ) const

get exit interface is present

Get production exit interface in object is present

Definition at line 2559 of file Object.cpp.

◆ getPhysics() [1/2]

PhysicsBehavior * Object::getPhysics ( )
inline

Definition at line 304 of file Object.h.

◆ getPhysics() [2/2]

const PhysicsBehavior * Object::getPhysics ( ) const
inline

Definition at line 305 of file Object.h.

◆ getProducerID()

ObjectID Object::getProducerID ( ) const
inline

Definition at line 189 of file Object.h.

◆ getProductionUpdateInterface()

ProductionUpdateInterface * Object::getProductionUpdateInterface ( void )

Search our update modules for a production update interface and return it if one is found

Definition at line 5835 of file Object.cpp.

◆ getProjectileUpdateInterface()

ProjectileUpdateInterface * Object::getProjectileUpdateInterface ( ) const

Definition at line 5926 of file Object.cpp.

◆ getRadarPriority()

RadarPriorityType Object::getRadarPriority ( void ) const

Return the radar priority for this object type

Definition at line 6264 of file Object.cpp.

◆ getReceivingDifficultyBonus()

Bool Object::getReceivingDifficultyBonus ( ) const
inline

Definition at line 623 of file Object.h.

◆ getRelationship()

Relationship Object::getRelationship ( const Object * that) const

Definition at line 1572 of file Object.cpp.

◆ getSafeOcclusionFrame()

UnsignedInt Object::getSafeOcclusionFrame ( void )
inline

Definition at line 626 of file Object.h.

◆ getShroudClearingRange()

Real Object::getShroudClearingRange ( ) const

How far do you clear shroud?

Definition at line 5152 of file Object.cpp.

◆ getShroudedStatus()

ObjectShroudStatus Object::getShroudedStatus ( Int playerIndex) const

Definition at line 1802 of file Object.cpp.

◆ getShroudRange()

Real Object::getShroudRange ( ) const

How far can you shroud? Even more dynamic since it'll start at zero for everyone.

Definition at line 5218 of file Object.cpp.

◆ getSingleLogicalBonePosition()

Bool Object::getSingleLogicalBonePosition ( const char * boneName,
Coord3D * position,
Matrix3D * transform ) const

Definition at line 6014 of file Object.cpp.

◆ getSingleLogicalBonePositionOnTurret()

Bool Object::getSingleLogicalBonePositionOnTurret ( WhichTurretType whichTurret,
const char * boneName,
Coord3D * position,
Matrix3D * transform ) const

Definition at line 6033 of file Object.cpp.

◆ getSoleHealingBenefactor()

ObjectID Object::getSoleHealingBenefactor ( void ) const

Definition at line 1897 of file Object.cpp.

◆ getSpawnBehaviorInterface()

SpawnBehaviorInterface * Object::getSpawnBehaviorInterface ( ) const

Get spawn behavior interface from object

Definition at line 5912 of file Object.cpp.

◆ getSpecialPowerModule()

SpecialPowerModuleInterface * Object::getSpecialPowerModule ( const SpecialPowerTemplate * specialPowerTemplate) const

Given a special power template, find the module in the object that can implement it. There can be at most one

Definition at line 5314 of file Object.cpp.

◆ getStatusBits()

ObjectStatusMaskType Object::getStatusBits ( ) const
inline

Definition at line 336 of file Object.h.

◆ getStealth()

StealthUpdate * Object::getStealth ( ) const
inline

Definition at line 292 of file Object.h.

◆ getTeam() [1/2]

Team * Object::getTeam ( )
inline

Definition at line 245 of file Object.h.

◆ getTeam() [2/2]

const Team * Object::getTeam ( ) const
inline

Definition at line 246 of file Object.h.

◆ getTransportSlotCount()

Int Object::getTransportSlotCount ( ) const

Definition at line 724 of file Object.cpp.

◆ getVeterancyLevel()

VeterancyLevel Object::getVeterancyLevel ( ) const

Definition at line 2969 of file Object.cpp.

◆ getVisionRange()

Real Object::getVisionRange ( ) const

How far can you see? This is dynamic so it is in Object.

Definition at line 5125 of file Object.cpp.

◆ getWeaponBonusCondition()

WeaponBonusConditionFlags Object::getWeaponBonusCondition ( ) const
inline

Definition at line 565 of file Object.h.

◆ getWeaponInWeaponSlot()

Weapon * Object::getWeaponInWeaponSlot ( WeaponSlotType wslot) const
inline

Definition at line 482 of file Object.h.

◆ getWeaponInWeaponSlotCommandSourceMask()

UnsignedInt Object::getWeaponInWeaponSlotCommandSourceMask ( WeaponSlotType wSlot) const
inline

Definition at line 483 of file Object.h.

◆ getWeaponSetFlags()

const WeaponSetFlags & Object::getWeaponSetFlags ( ) const
inline

Definition at line 546 of file Object.h.

◆ giveUpgrade()

void Object::giveUpgrade ( const UpgradeTemplate * upgradeT)

give upgrade to this object

Give this upgrade to this object

Definition at line 4498 of file Object.cpp.

◆ goInvulnerable()

void Object::goInvulnerable ( UnsignedInt time)

Definition at line 6249 of file Object.cpp.

◆ handlePartitionCellMaintenance()

void Object::handlePartitionCellMaintenance ( )

Undo and redo all shroud actions. Call when something has changed, like position or ownership or Death.

Definition at line 4795 of file Object.cpp.

◆ handleShroud()

void Object::handleShroud ( )
protected

Definition at line 4803 of file Object.cpp.

◆ handleThreatMap()

void Object::handleThreatMap ( )
protected

Definition at line 4824 of file Object.cpp.

◆ handleValueMap()

void Object::handleValueMap ( )
protected

Definition at line 4817 of file Object.cpp.

◆ hasAnyDamageWeapon()

Bool Object::hasAnyDamageWeapon ( ) const

Definition at line 1247 of file Object.cpp.

◆ hasAnySpecialPower()

Bool Object::hasAnySpecialPower ( ) const

Definition at line 3082 of file Object.cpp.

◆ hasAnyWeapon()

Bool Object::hasAnyWeapon ( ) const

Definition at line 1241 of file Object.cpp.

◆ hasCountermeasures()

Bool Object::hasCountermeasures ( ) const

Definition at line 6381 of file Object.cpp.

◆ hasCustomIndicatorColor()

Bool Object::hasCustomIndicatorColor ( ) const
inline

Definition at line 258 of file Object.h.

◆ hasExitInterface()

Bool Object::hasExitInterface ( ) const
inline

Definition at line 578 of file Object.h.

◆ hasSingleUseCommandBeenUsed()

Bool Object::hasSingleUseCommandBeenUsed ( ) const
inline

Definition at line 383 of file Object.h.

◆ hasSpecialPower()

Bool Object::hasSpecialPower ( SpecialPowerType type) const

return true if the template has the specified special power flag set

Definition at line 3076 of file Object.cpp.

◆ hasUpgrade()

Bool Object::hasUpgrade ( const UpgradeTemplate * upgradeT) const

does this object already have this upgrade

Does this object have this upgrade

Definition at line 4456 of file Object.cpp.

◆ hasWeaponToDealDamageType()

Bool Object::hasWeaponToDealDamageType ( DamageType typeToDeal) const

Definition at line 1264 of file Object.cpp.

◆ healCompletely()

void Object::healCompletely ( )

Restore max health to this Object.

Restore max health to this Object

Definition at line 1973 of file Object.cpp.

◆ initObject()

void Object::initObject ( )

Emit message announcing object's creation Note: Have to do this in virtual init() method because virtual methods don't become virtual until AFTER the constructor has completed, and we need to send our type in this message via virtual getType().

Definition at line 519 of file Object.cpp.

◆ isAbleToAttack()

Bool Object::isAbleToAttack ( ) const

returns true if object currently has some kind of attack capability

Returns true if object currently has some kind of attack capability

Definition at line 3177 of file Object.cpp.

◆ isAirborneTarget()

Bool Object::isAirborneTarget ( ) const
inline

Our locomotor will control marking us as a valid target for anti air weapons or not.

Definition at line 214 of file Object.h.

◆ isCaptured()

Bool Object::isCaptured ( ) const
inline

Definition at line 270 of file Object.h.

◆ isContained()

Bool Object::isContained ( ) const
inline

Definition at line 445 of file Object.h.

◆ isCurWeaponLocked()

Bool Object::isCurWeaponLocked ( ) const
inline

Definition at line 549 of file Object.h.

◆ isDestroyed()

Bool Object::isDestroyed ( ) const
inline

Returns TRUE if object has been destroyed.

Definition at line 213 of file Object.h.

◆ isDisabled()

Bool Object::isDisabled ( ) const
inline

Definition at line 583 of file Object.h.

◆ isDisabledByType()

Bool Object::isDisabledByType ( DisabledType type) const
inline

Definition at line 588 of file Object.h.

◆ isEffectivelyDead()

Bool Object::isEffectivelyDead ( ) const
inline

Definition at line 379 of file Object.h.

◆ isFactionStructure()

Bool Object::isFactionStructure ( void ) const

Definition at line 2017 of file Object.cpp.

◆ isHero()

Bool Object::isHero ( void ) const

Definition at line 2039 of file Object.cpp.

◆ isInList()

Bool Object::isInList ( Object ** pListHead) const

Definition at line 2690 of file Object.cpp.

◆ isInside()

Bool Object::isInside ( const PolygonTrigger * pTrigger) const

Returns whether an object is inside an area.

Definition at line 2544 of file Object.cpp.

◆ isLocallyControlled()

Bool Object::isLocallyControlled ( ) const

Definition at line 1693 of file Object.cpp.

◆ isMassSelectable()

Bool Object::isMassSelectable ( ) const

Definition at line 3048 of file Object.cpp.

◆ isMobile()

Bool Object::isMobile ( ) const

returns true if object is currently able to move

Returns true if object is currently able to move.

Definition at line 2902 of file Object.cpp.

◆ isNeutralControlled()

Bool Object::isNeutralControlled ( ) const

Definition at line 1701 of file Object.cpp.

◆ isNonFactionStructure()

Bool Object::isNonFactionStructure ( void ) const

Definition at line 2023 of file Object.cpp.

◆ isOffMap()

Bool Object::isOffMap ( ) const
inline

Definition at line 268 of file Object.h.

◆ isOutOfAmmo()

Bool Object::isOutOfAmmo ( ) const

Definition at line 1235 of file Object.cpp.

◆ isReloadTimeShared()

const Bool Object::isReloadTimeShared ( ) const
inline

Definition at line 486 of file Object.h.

◆ isSalvageCrate()

Bool Object::isSalvageCrate ( ) const

Definition at line 2417 of file Object.cpp.

◆ isSelectable()

Bool Object::isSelectable ( ) const

Definition at line 3025 of file Object.cpp.

◆ isStructure()

Bool Object::isStructure ( void ) const

Definition at line 2011 of file Object.cpp.

◆ isUsingAirborneLocomotor()

Bool Object::isUsingAirborneLocomotor ( void ) const

returns true if the current locomotor is an airborne one

Definition at line 3360 of file Object.cpp.

◆ kill()

void Object::kill ( DamageType damageType = DAMAGE_UNRESISTABLE,
DeathType deathType = DEATH_NORMAL )

kill the object with an optional type of damage and death.

Do so much damage to an object that it will certainly die

Definition at line 1954 of file Object.cpp.

◆ leaveGroup()

void Object::leaveGroup ( void )

leave our current AIGroup

Definition at line 6320 of file Object.cpp.

◆ loadPostProcess()

void Object::loadPostProcess ( void )
protectedvirtual

Object load game post process phase

Implements Snapshot.

Definition at line 4444 of file Object.cpp.

◆ look()

void Object::look ( )
protected

Look and unlook are protected. They should be called from Object::reasonToLook. Like Capture, or death.

Definition at line 4933 of file Object.cpp.

◆ markSingleUseCommandUsed()

void Object::markSingleUseCommandUsed ( )
inline

Definition at line 382 of file Object.h.

◆ maskObject()

void Object::maskObject ( Bool mask)

mask/unmask object

Mask/Un-Mask an object

Definition at line 3338 of file Object.cpp.

◆ notifyFiringTrackerShotFired()

void Object::notifyFiringTrackerShotFired ( const Weapon * weaponFired,
ObjectID victimID )

Definition at line 1520 of file Object.cpp.

◆ notifySubdualDamage()

void Object::notifySubdualDamage ( Real amount)

At this level, we just pass this on to our helper and do a special tint.

Definition at line 5295 of file Object.cpp.

◆ onCapture()

void Object::onCapture ( Player * oldOwner,
Player * newOwner )

central place for us to put any additional capture logic

Central point for onCapture logic

Definition at line 4533 of file Object.cpp.

◆ onCollide()

void Object::onCollide ( Object * other,
const Coord3D * loc,
const Coord3D * normal )

Definition at line 2393 of file Object.cpp.

◆ onContainedBy()

void Object::onContainedBy ( Object * containedBy)

this object now contained in "containedBy"

Definition at line 695 of file Object.cpp.

◆ onDestroy()

void Object::onDestroy ( )

run during TheGameLogic::destroyObject

Run from GameLogic::destroyObject

Definition at line 746 of file Object.cpp.

◆ onDie()

void Object::onDie ( DamageInfo * damageInfo)

And game death logic. Destroy is deletion of object as code.

Object level events that need to happen upon game death.

Definition at line 4572 of file Object.cpp.

◆ onDisabledEdge()

void Object::onDisabledEdge ( Bool becomingDisabled)
protected

Definition at line 3814 of file Object.cpp.

◆ onPartitionCellChange()

void Object::onPartitionCellChange ( )

We have moved a 'significant' amount, so do maintenence that can be considered 'cell-based'.

Definition at line 4789 of file Object.cpp.

◆ onRemovedFrom()

void Object::onRemovedFrom ( Object * removedFrom)

this object no longer contained in "containedBy"

Definition at line 712 of file Object.cpp.

◆ onVeterancyLevelChanged()

void Object::onVeterancyLevelChanged ( VeterancyLevel oldLevel,
VeterancyLevel newLevel,
Bool provideFeedback = TRUE )

I just achieved this level right this moment.

Definition at line 3088 of file Object.cpp.

◆ pauseAllSpecialPowers()

void Object::pauseAllSpecialPowers ( const Bool disabling) const

Definition at line 2359 of file Object.cpp.

◆ preFireCurrentWeapon()

void Object::preFireCurrentWeapon ( const Object * victim)

Definition at line 1528 of file Object.cpp.

◆ prependToList()

void Object::prependToList ( Object ** pListHead)

Definition at line 2710 of file Object.cpp.

◆ reactToTransformChange()

void Object::reactToTransformChange ( const Matrix3D * oldMtx,
const Coord3D * oldPos,
Real oldAngle )
protectedvirtual

Implements Thing.

Definition at line 1764 of file Object.cpp.

◆ reactToTurretChange()

void Object::reactToTurretChange ( WhichTurretType turret,
Real oldRotation,
Real oldPitch )
virtual

Definition at line 1744 of file Object.cpp.

◆ releaseWeaponLock()

void Object::releaseWeaponLock ( WeaponLockType lockType)
inline

Definition at line 548 of file Object.h.

◆ reloadAllAmmo()

void Object::reloadAllAmmo ( Bool now)

Definition at line 1229 of file Object.cpp.

◆ removeCustomIndicatorColor()

void Object::removeCustomIndicatorColor ( )

Definition at line 1637 of file Object.cpp.

◆ removeFromList()

void Object::removeFromList ( Object ** pListHead)

Definition at line 2785 of file Object.cpp.

◆ removeThreat()

void Object::removeThreat ( )
protected

Definition at line 4911 of file Object.cpp.

◆ removeUpgrade()

void Object::removeUpgrade ( const UpgradeTemplate * upgradeT)

remove upgrade from this object

Remove this upgrade from this object

Definition at line 4515 of file Object.cpp.

◆ removeValue()

void Object::removeValue ( )
protected

Definition at line 4861 of file Object.cpp.

◆ reportMissileForCountermeasures()

void Object::reportMissileForCountermeasures ( Object * missile)

Definition at line 6392 of file Object.cpp.

◆ restoreOriginalTeam()

void Object::restoreOriginalTeam ( )

Definition at line 807 of file Object.cpp.

◆ scoreTheKill()

void Object::scoreTheKill ( const Object * victim)

I just killed this object.

Todo
Multiplayer score hook location?

Definition at line 2914 of file Object.cpp.

◆ setArmorSetFlag()

void Object::setArmorSetFlag ( ArmorSetType ast)

Definition at line 1211 of file Object.cpp.

◆ setBuilder()

void Object::setBuilder ( const Object * obj)

Definition at line 1618 of file Object.cpp.

◆ setCaptured()

void Object::setCaptured ( Bool isCaptured)

Definition at line 1995 of file Object.cpp.

◆ setCommandSetStringOverride()

void Object::setCommandSetStringOverride ( AsciiString newCommandSetString)
inline

Definition at line 467 of file Object.h.

◆ setConstructionPercent()

void Object::setConstructionPercent ( Real percent)
inline

Definition at line 400 of file Object.h.

◆ setCustomIndicatorColor()

void Object::setCustomIndicatorColor ( Color c)

Definition at line 1626 of file Object.cpp.

◆ setDestinationLayer()

void Object::setDestinationLayer ( PathfindLayerEnum layer)

Definition at line 2743 of file Object.cpp.

◆ setDisabled()

void Object::setDisabled ( DisabledType type)

Definition at line 2068 of file Object.cpp.

◆ setDisabledUntil()

void Object::setDisabledUntil ( DisabledType type,
UnsignedInt frame )

Definition at line 2074 of file Object.cpp.

◆ setEffectivelyDead()

void Object::setEffectivelyDead ( Bool dead)

Definition at line 1980 of file Object.cpp.

◆ setFiringConditionForCurrentWeapon()

void Object::setFiringConditionForCurrentWeapon ( ) const

Definition at line 1288 of file Object.cpp.

◆ setFormationID()

void Object::setFormationID ( enum FormationID id)
inline

Definition at line 366 of file Object.h.

◆ setFormationOffset()

void Object::setFormationOffset ( const Coord2D & offset)
inline

Definition at line 368 of file Object.h.

◆ setGeometryInfo()

void Object::setGeometryInfo ( const GeometryInfo & geom)

Definition at line 770 of file Object.cpp.

◆ setGeometryInfoZ()

void Object::setGeometryInfoZ ( Real newZ)

Definition at line 788 of file Object.cpp.

◆ setHealthBoxOffset()

void Object::setHealthBoxOffset ( const Coord3D & offset)
inline

for special amorphous like angry mob

Definition at line 603 of file Object.h.

◆ setID()

void Object::setID ( ObjectID id)
protected

Set unique ID

Definition at line 2753 of file Object.cpp.

◆ setLayer()

void Object::setLayer ( PathfindLayerEnum layer)

Definition at line 2723 of file Object.cpp.

◆ setModelConditionFlags()

void Object::setModelConditionFlags ( const ModelConditionFlags & set)

Definition at line 1335 of file Object.cpp.

◆ setModelConditionState()

void Object::setModelConditionState ( ModelConditionFlagType a)

Definition at line 1299 of file Object.cpp.

◆ setName()

void Object::setName ( const AsciiString & newName)
inline

Definition at line 243 of file Object.h.

◆ setOrRestoreTeam()

void Object::setOrRestoreTeam ( Team * team,
Bool restoring )
protected

Definition at line 851 of file Object.cpp.

◆ setProducer()

void Object::setProducer ( const Object * obj)

Definition at line 1609 of file Object.cpp.

◆ setReceivingDifficultyBonus()

void Object::setReceivingDifficultyBonus ( Bool receive)

Definition at line 2055 of file Object.cpp.

◆ setSafeOcclusionFrame()

void Object::setSafeOcclusionFrame ( UnsignedInt frame)
inline

Definition at line 627 of file Object.h.

◆ setScriptStatus()

void Object::setScriptStatus ( ObjectScriptStatusBit bit,
Bool set = true )

Definition at line 1043 of file Object.cpp.

◆ setSelectable()

void Object::setSelectable ( Bool selectable)

Definition at line 3015 of file Object.cpp.

◆ setShroudClearingRange()

void Object::setShroudClearingRange ( Real newShroudClearingRange)

Access to setting someone's clear shroud distance.

Definition at line 5183 of file Object.cpp.

◆ setShroudRange()

void Object::setShroudRange ( Real newShroudRange)

Access to setting someone's shrouding distance.

Definition at line 5240 of file Object.cpp.

◆ setSpecialModelConditionState()

void Object::setSpecialModelConditionState ( ModelConditionFlagType set,
UnsignedInt frames = 0 )

Definition at line 1358 of file Object.cpp.

◆ setStatus()

void Object::setStatus ( ObjectStatusMaskType objectStatus,
Bool set = true )

Definition at line 978 of file Object.cpp.

◆ setTeam()

void Object::setTeam ( Team * team)

sets the unit's team AND original team

Definition at line 830 of file Object.cpp.

◆ setTemporaryTeam()

void Object::setTemporaryTeam ( Team * team)

sets the unit's team BUT NOT its original team

Definition at line 843 of file Object.cpp.

◆ setTriggerAreaFlagsForChangeInPosition()

void Object::setTriggerAreaFlagsForChangeInPosition ( void )
protected

Checks the object against trigger areas when the position changes.

Definition at line 2587 of file Object.cpp.

◆ setVisionRange()

void Object::setVisionRange ( Real newVisionRange)

Access to setting someone's Vision distance.

Definition at line 5146 of file Object.cpp.

◆ setVisionSpied()

void Object::setVisionSpied ( Bool setting,
Int byWhom )

Change who is looking through our eyes.

Definition at line 5246 of file Object.cpp.

◆ setWeaponBonusCondition()

void Object::setWeaponBonusCondition ( WeaponBonusConditionType wst)

Definition at line 4674 of file Object.cpp.

◆ setWeaponLock()

Bool Object::setWeaponLock ( WeaponSlotType weaponSlot,
WeaponLockType lockType )
inline

Definition at line 547 of file Object.h.

◆ setWeaponSetFlag()

void Object::setWeaponSetFlag ( WeaponSetType wst)

Definition at line 3054 of file Object.cpp.

◆ shroud()

void Object::shroud ( )
protected

Definition at line 5069 of file Object.cpp.

◆ testArmorSetFlag()

Bool Object::testArmorSetFlag ( ArmorSetType ast) const

Definition at line 1223 of file Object.cpp.

◆ testScriptStatusBit()

Bool Object::testScriptStatusBit ( ObjectScriptStatusBit b) const
inline

Definition at line 352 of file Object.h.

◆ testStatus()

Bool Object::testStatus ( ObjectStatusTypes bit) const
inline

Definition at line 337 of file Object.h.

◆ testWeaponBonusCondition()

Bool Object::testWeaponBonusCondition ( WeaponBonusConditionType wst) const
inline

Definition at line 564 of file Object.h.

◆ testWeaponSetFlag()

Bool Object::testWeaponSetFlag ( WeaponSetType wst) const
inline

Definition at line 545 of file Object.h.

◆ topple()

void Object::topple ( const Coord3D * toppleDirection,
Real toppleSpeed,
UnsignedInt options )

Topple an object, if possible

Definition at line 1195 of file Object.cpp.

◆ unlook()

void Object::unlook ( )
protected

Definition at line 5031 of file Object.cpp.

◆ unshroud()

void Object::unshroud ( )
protected

Definition at line 5107 of file Object.cpp.

◆ updateObjValuesFromMapProperties()

void Object::updateObjValuesFromMapProperties ( Dict * properties)

Brings in properties set in the editor.

Update this object instance with properties from the map object

Definition at line 3449 of file Object.cpp.

◆ updateTriggerAreaFlags()

void Object::updateTriggerAreaFlags ( void )
protected

Clear the previous entered/exited flags.

Definition at line 2375 of file Object.cpp.

◆ updateUpgradeModules()

void Object::updateUpgradeModules ( )

We need to go through our Upgrade Modules and see which should be activated.

Our owning player is telling us to recheck our UpgradeModules, as an upgrade has completed

Definition at line 2434 of file Object.cpp.

◆ xfer()

void Object::xfer ( Xfer * xfer)
protectedvirtual

Object xfer implemtation Version Info: 1: Initial version 2: Xfers m_singleUseCommandUsed... determines if the single use command button has been used or not. 3: Xfers the solehealingbenefactor ID and expiration frame 4: misc stuff that got missed somehow 5: m_isReceivingDifficultyBonus 6: We do indeed need to save m_containedBy. The comment misrepresents what the contain module will do. 7: save full mtx, not pos+orient. 8: Kris: Conversion of object status bits from UnsignedInt to BitFlags<> 9: Extra sighting for reveal to all with different range units

Implements Snapshot.

Definition at line 4032 of file Object.cpp.


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