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

#include <InactiveBody.h>

Inherits BodyModule.

Public Member Functions

 InactiveBody (Thing *thing, const ModuleData *moduleData)
 
virtual void attemptDamage (DamageInfo *damageInfo)
 try to damage this object
 
virtual void attemptHealing (DamageInfo *damageInfo)
 try to heal this object
 
virtual Real estimateDamage (DamageInfoInput &damageInfo) const
 
virtual Real getHealth () const
 get current health
 
virtual BodyDamageType getDamageState () const
 
virtual void setDamageState (BodyDamageType newState)
 control damage state directly. Will adjust hitpoints.
 
virtual void setAflame (Bool setting)
 This is a major change like a damage state.
 
void onVeterancyLevelChanged (VeterancyLevel oldLevel, VeterancyLevel newLevel, Bool provideFeedback)
 I just achieved this level right this moment.
 
virtual void setArmorSetFlag (ArmorSetType ast)
 
virtual void clearArmorSetFlag (ArmorSetType ast)
 
virtual Bool testArmorSetFlag (ArmorSetType ast)
 
virtual void internalChangeHealth (Real delta)
 
- Public Member Functions inherited from BodyModule
 BodyModule (Thing *thing, const ModuleData *moduleData)
 
virtual BodyModuleInterfacegetBody ()
 
virtual Real getMaxHealth () const
 return max health
 
virtual Real getPreviousHealth () const
 return previous health
 
virtual UnsignedInt getSubdualDamageHealRate () const
 
virtual Real getSubdualDamageHealAmount () const
 
virtual Bool hasAnySubdualDamage () const
 
virtual Real getCurrentSubdualDamageAmount () const
 
virtual Real getInitialHealth () const
 
virtual const DamageInfogetLastDamageInfo () const
 return info on last damage dealt to this object
 
virtual UnsignedInt getLastDamageTimestamp () const
 return frame of last damage dealt
 
virtual UnsignedInt getLastHealingTimestamp () const
 return frame of last healing dealt
 
virtual ObjectID getClearableLastAttacker () const
 
virtual void clearLastAttacker ()
 
virtual Bool getFrontCrushed () const
 
virtual Bool getBackCrushed () const
 
virtual void setInitialHealth (Int initialPercent)
 Sets the inital load health %.
 
virtual void setMaxHealth (Real maxHealth, MaxHealthChangeType healthChangeType=SAME_CURRENTHEALTH)
 Sets the max health.
 
virtual void setFrontCrushed (Bool v)
 
virtual void setBackCrushed (Bool v)
 
virtual void setIndestructible (Bool indestructible)
 
virtual Bool isIndestructible (void) const
 
virtual void applyDamageScalar (Real scalar)
 
virtual Real getDamageScalar () const
 
virtual void evaluateVisualCondition ()
 
virtual void updateBodyParticleSystems ()
 
- Public Member Functions inherited from BehaviorModule
 BehaviorModule (Thing *thing, const ModuleData *moduleData)
 
virtual CollideModuleInterfacegetCollide ()
 
virtual ContainModuleInterfacegetContain ()
 
virtual CreateModuleInterfacegetCreate ()
 
virtual DamageModuleInterfacegetDamage ()
 
virtual DestroyModuleInterfacegetDestroy ()
 
virtual DieModuleInterfacegetDie ()
 
virtual SpecialPowerModuleInterfacegetSpecialPower ()
 
virtual UpdateModuleInterfacegetUpdate ()
 
virtual UpgradeModuleInterfacegetUpgrade ()
 
virtual StealthUpdategetStealth ()
 
virtual SpyVisionUpdategetSpyVisionUpdate ()
 
virtual ParkingPlaceBehaviorInterfacegetParkingPlaceBehaviorInterface ()
 
virtual RebuildHoleBehaviorInterfacegetRebuildHoleBehaviorInterface ()
 
virtual BridgeBehaviorInterfacegetBridgeBehaviorInterface ()
 
virtual BridgeTowerBehaviorInterfacegetBridgeTowerBehaviorInterface ()
 
virtual BridgeScaffoldBehaviorInterfacegetBridgeScaffoldBehaviorInterface ()
 
virtual OverchargeBehaviorInterfacegetOverchargeBehaviorInterface ()
 
virtual TransportPassengerInterfacegetTransportPassengerInterface ()
 
virtual CaveInterfacegetCaveInterface ()
 
virtual LandMineInterfacegetLandMineInterface ()
 
virtual DieModuleInterfacegetEjectPilotDieInterface ()
 
virtual ProjectileUpdateInterfacegetProjectileUpdateInterface ()
 
virtual AIUpdateInterfacegetAIUpdateInterface ()
 
virtual ExitInterfacegetUpdateExitInterface ()
 
virtual DockUpdateInterfacegetDockUpdateInterface ()
 
virtual RailedTransportDockUpdateInterfacegetRailedTransportDockUpdateInterface (void)
 
virtual SlowDeathBehaviorInterfacegetSlowDeathBehaviorInterface ()
 
virtual SpecialPowerUpdateInterfacegetSpecialPowerUpdateInterface ()
 
virtual SlavedUpdateInterfacegetSlavedUpdateInterface ()
 
virtual ProductionUpdateInterfacegetProductionUpdateInterface ()
 
virtual HordeUpdateInterfacegetHordeUpdateInterface ()
 
virtual PowerPlantUpdateInterfacegetPowerPlantUpdateInterface ()
 
virtual SpawnBehaviorInterfacegetSpawnBehaviorInterface ()
 
virtual CountermeasuresBehaviorInterfacegetCountermeasuresBehaviorInterface ()
 
virtual const CountermeasuresBehaviorInterfacegetCountermeasuresBehaviorInterface () const
 
- Public Member Functions inherited from ObjectModule
 ObjectModule (Thing *thing, const ModuleData *moduleData)
 < this abstract class needs memory pool hooks
 
virtual void onCapture (Player *oldOwner, Player *newOwner)
 
virtual void onDisabledEdge (Bool nowDisabled)
 
- Public Member Functions inherited from Module
 Module (const ModuleData *moduleData)
 < this abstract class needs memory pool hooks
 
virtual NameKeyType getModuleNameKey () const =0
 
NameKeyType getModuleTagNameKey () const
 
virtual void onObjectCreated ()
 
virtual void onDrawableBoundToObject ()
 
virtual void preloadAssets (TimeOfDay timeOfDay)
 preload any assets we might have for this time of day
 
virtual void onDelete (void)
 
- Public Member Functions inherited from MemoryPoolObject
void deleteInstance ()
 
- Public Member Functions inherited from Snapshot
 Snapshot (void)
 
 ~Snapshot (void)
 

Additional Inherited Members

- Static Public Member Functions inherited from BodyModule
static Int getInterfaceMask ()
 
- Static Public Member Functions inherited from BehaviorModule
static Int getInterfaceMask ()
 
static ModuleType getModuleType ()
 
- Static Public Member Functions inherited from Module
static ModuleDatafriend_newModuleData (INI *ini)
 
- Protected Member Functions inherited from BodyModule
virtual void crc (Xfer *xfer)
 
virtual void xfer (Xfer *xfer)
 
virtual void loadPostProcess (void)
 
- Protected Member Functions inherited from ObjectModule
ObjectgetObject ()
 
const ObjectgetObject () const
 
- Protected Member Functions inherited from Module
const ModuleDatagetModuleData () const
 
- Protected Member Functions inherited from MemoryPoolObject
virtual ~MemoryPoolObject ()
 
void * operator new (size_t s)
 
void operator delete (void *p)
 
virtual MemoryPoolgetObjectMemoryPool ()=0
 
- Protected Attributes inherited from BodyModule
Real m_damageScalar
 

Detailed Description

Inactive body module

Definition at line 42 of file InactiveBody.h.

Constructor & Destructor Documentation

◆ InactiveBody()

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

Definition at line 46 of file InactiveBody.cpp.

Member Function Documentation

◆ attemptDamage()

void InactiveBody::attemptDamage ( DamageInfo * damageInfo)
virtual

try to damage this object

Implements BodyModule.

Definition at line 77 of file InactiveBody.cpp.

◆ attemptHealing()

void InactiveBody::attemptHealing ( DamageInfo * damageInfo)
virtual

try to heal this object

Implements BodyModule.

Definition at line 114 of file InactiveBody.cpp.

◆ clearArmorSetFlag()

virtual void InactiveBody::clearArmorSetFlag ( ArmorSetType ast)
inlinevirtual

Implements BodyModule.

Definition at line 64 of file InactiveBody.h.

◆ estimateDamage()

Real InactiveBody::estimateDamage ( DamageInfoInput & damageInfo) const
virtual

Estimate the (unclipped) damage that would be done to this object by the given damage (taking bonuses, armor, etc into account), but DO NOT alter the body in any way. (This is used by the AI system to choose weapons.)

Implements BodyModule.

Definition at line 61 of file InactiveBody.cpp.

◆ getDamageState()

BodyDamageType InactiveBody::getDamageState ( ) const
virtual

Implements BodyModule.

Definition at line 153 of file InactiveBody.cpp.

◆ getHealth()

Real InactiveBody::getHealth ( ) const
virtual

get current health

Implements BodyModule.

Definition at line 143 of file InactiveBody.cpp.

◆ internalChangeHealth()

void InactiveBody::internalChangeHealth ( Real delta)
virtual

Change the module's health by the given delta. Note that the module's DamageFX and Armor are NOT taken into account, so you should think about what you're bypassing when you call this directly (especially when when decreasing health, since you probably want "attemptDamage" or "attemptHealing")

Implements BodyModule.

Definition at line 134 of file InactiveBody.cpp.

◆ onVeterancyLevelChanged()

void InactiveBody::onVeterancyLevelChanged ( VeterancyLevel oldLevel,
VeterancyLevel newLevel,
Bool provideFeedback )
inlinevirtual

I just achieved this level right this moment.

Implements BodyModule.

Definition at line 61 of file InactiveBody.h.

◆ setAflame()

virtual void InactiveBody::setAflame ( Bool setting)
inlinevirtual

This is a major change like a damage state.

Implements BodyModule.

Definition at line 59 of file InactiveBody.h.

◆ setArmorSetFlag()

virtual void InactiveBody::setArmorSetFlag ( ArmorSetType ast)
inlinevirtual

Implements BodyModule.

Definition at line 63 of file InactiveBody.h.

◆ setDamageState()

void InactiveBody::setDamageState ( BodyDamageType newState)
virtual

control damage state directly. Will adjust hitpoints.

Parameters
newStatecontrol damage state directly. Will adjust hitpoints.

Implements BodyModule.

Definition at line 160 of file InactiveBody.cpp.

◆ testArmorSetFlag()

virtual Bool InactiveBody::testArmorSetFlag ( ArmorSetType ast)
inlinevirtual

Implements BodyModule.

Definition at line 65 of file InactiveBody.h.


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