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

#include <CrateCollide.h>

Inherits CollideModule.

Inherited by ConvertToCarBombCrateCollide, ConvertToHijackedVehicleCrateCollide, HealCrateCollide, MoneyCrateCollide, SabotageCommandCenterCrateCollide, SabotageFakeBuildingCrateCollide, SabotageInternetCenterCrateCollide, SabotageMilitaryFactoryCrateCollide, SabotagePowerPlantCrateCollide, SabotageSuperweaponCrateCollide, SabotageSupplyCenterCrateCollide, SabotageSupplyDropzoneCrateCollide, SalvageCrateCollide, ShroudCrateCollide, UnitCrateCollide, and VeterancyCrateCollide.

Public Types

enum  SabotageVictimType {
  SAB_VICTIM_GENERIC = 0 , SAB_VICTIM_COMMAND_CENTER , SAB_VICTIM_FAKE_BUILDING , SAB_VICTIM_INTERNET_CENTER ,
  SAB_VICTIM_MILITARY_FACTORY , SAB_VICTIM_POWER_PLANT , SAB_VICTIM_SUPERWEAPON , SAB_VICTIM_SUPPLY_CENTER ,
  SAB_VICTIM_DROP_ZONE
}
 

Public Member Functions

 CrateCollide (Thing *thing, const ModuleData *moduleData)
 
virtual void onCollide (Object *other, const Coord3D *loc, const Coord3D *normal)
 This collide method gets called when collision occur.
 
virtual Bool wouldLikeToCollideWith (const Object *other) const
 this is used for things like pilots, to determine if they can "enter" something
 
virtual Bool isRailroad () const
 
virtual Bool isCarBombCrateCollide () const
 
virtual Bool isHijackedVehicleCrateCollide () const
 
virtual Bool isSabotageBuildingCrateCollide () const
 
void doSabotageFeedbackFX (const Object *other, SabotageVictimType type=SAB_VICTIM_GENERIC)
 
- Public Member Functions inherited from CollideModule
 CollideModule (Thing *thing, const ModuleData *moduleData)
 
virtual CollideModuleInterfacegetCollide ()
 
virtual Bool isSalvageCrateCollide () const
 
- Public Member Functions inherited from BehaviorModule
 BehaviorModule (Thing *thing, const ModuleData *moduleData)
 
virtual BodyModuleInterfacegetBody ()
 
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)
 

Protected Member Functions

virtual Bool executeCrateBehavior (Object *other)=0
 This is the game logic execution function that all real CrateCollides will implement.
 
virtual Bool isValidToExecute (const Object *other) const
 This allows specific vetoes to certain types of crates and their data.
 
- Protected Member Functions inherited from BehaviorModule
virtual void crc (Xfer *xfer)
 
virtual void xfer (Xfer *xfer)
 
virtual void loadPostProcess (void)
 
- Protected Member Functions inherited from ObjectModule
ObjectgetObject ()
 
const ObjectgetObject () const
 
- Protected Member Functions inherited from Module
const ModuleDatagetModuleData () const
 
- Protected Member Functions inherited from MemoryPoolObject
virtual ~MemoryPoolObject ()
 
void * operator new (size_t s)
 
void operator delete (void *p)
 
virtual MemoryPoolgetObjectMemoryPool ()=0
 

Additional Inherited Members

- Static Public Member Functions inherited from CollideModule
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)
 

Detailed Description

Definition at line 66 of file CrateCollide.h.

Member Enumeration Documentation

◆ SabotageVictimType

Enumerator
SAB_VICTIM_GENERIC 
SAB_VICTIM_COMMAND_CENTER 
SAB_VICTIM_FAKE_BUILDING 
SAB_VICTIM_INTERNET_CENTER 
SAB_VICTIM_MILITARY_FACTORY 
SAB_VICTIM_POWER_PLANT 
SAB_VICTIM_SUPERWEAPON 
SAB_VICTIM_SUPPLY_CENTER 
SAB_VICTIM_DROP_ZONE 

Definition at line 75 of file CrateCollide.h.

Constructor & Destructor Documentation

◆ CrateCollide()

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

Definition at line 99 of file CrateCollide.cpp.

Member Function Documentation

◆ doSabotageFeedbackFX()

void CrateCollide::doSabotageFeedbackFX ( const Object * other,
SabotageVictimType type = SAB_VICTIM_GENERIC )

Definition at line 198 of file CrateCollide.cpp.

◆ executeCrateBehavior()

◆ isCarBombCrateCollide()

virtual Bool CrateCollide::isCarBombCrateCollide ( ) const
inlinevirtual

Reimplemented from CollideModule.

Reimplemented in ConvertToCarBombCrateCollide.

Definition at line 97 of file CrateCollide.h.

◆ isHijackedVehicleCrateCollide()

virtual Bool CrateCollide::isHijackedVehicleCrateCollide ( ) const
inlinevirtual

Reimplemented from CollideModule.

Reimplemented in ConvertToHijackedVehicleCrateCollide.

Definition at line 98 of file CrateCollide.h.

◆ isRailroad()

virtual Bool CrateCollide::isRailroad ( ) const
inlinevirtual

Reimplemented from CollideModule.

Reimplemented in ConvertToCarBombCrateCollide.

Definition at line 96 of file CrateCollide.h.

◆ isSabotageBuildingCrateCollide()

◆ isValidToExecute()

◆ onCollide()

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

This collide method gets called when collision occur.

The collide event. Note that when other is NULL it means "collide with ground"

Implements CollideModule.

Definition at line 115 of file CrateCollide.cpp.

◆ wouldLikeToCollideWith()

virtual Bool CrateCollide::wouldLikeToCollideWith ( const Object * other) const
inlinevirtual

this is used for things like pilots, to determine if they can "enter" something

Reimplemented from CollideModule.

Definition at line 94 of file CrateCollide.h.


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