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

#include <NeutronMissileUpdate.h>

Inherits UpdateModule, DieModuleInterface, and ProjectileUpdateInterface.

Public Types

enum  MissileStateType { PRELAUNCH , LAUNCH , ATTACK , DEAD }
 

Public Member Functions

 NeutronMissileUpdate (Thing *thing, const ModuleData *moduleData)
 
virtual DieModuleInterfacegetDie ()
 
virtual void onDie (const DamageInfo *damageInfo)
 
virtual ProjectileUpdateInterfacegetProjectileUpdateInterface ()
 
virtual void projectileLaunchAtObjectOrPosition (const Object *victim, const Coord3D *victimPos, const Object *launcher, WeaponSlotType wslot, Int specificBarrelToUse, const WeaponTemplate *detWeap, const ParticleSystemTemplate *exhaustSysOverride)
 launch the projectile at the given victim
 
virtual void projectileFireAtObjectOrPosition (const Object *victim, const Coord3D *victimPos, const WeaponTemplate *detWeap, const ParticleSystemTemplate *exhaustSysOverride)
 
virtual Bool projectileIsArmed () const
 return true if the missile is armed and ready to explode
 
virtual ObjectID projectileGetLauncherID () const
 Return firer of missile. Returns 0 if not yet fired.
 
virtual Bool projectileHandleCollision (Object *other)
 
virtual const Coord3DgetVelocity () const
 get current velocity
 
virtual void setFramesTillCountermeasureDiversionOccurs (UnsignedInt frames)
 Number of frames till missile diverts to countermeasures.
 
virtual void projectileNowJammed ()
 
virtual UpdateSleepTime update ()
 
virtual void onDelete (void)
 
- Public Member Functions inherited from UpdateModule
 UpdateModule (Thing *thing, const ModuleData *moduleData)
 
virtual UpdateModuleInterfacegetUpdate ()
 
DisabledMaskType getDisabledTypesToProcess () const
 
UPDATEMODULE_FRIEND_DECLARATOR UnsignedInt friend_getPriority () const
 
UPDATEMODULE_FRIEND_DECLARATOR UnsignedInt friend_getNextCallFrame () const
 
UPDATEMODULE_FRIEND_DECLARATOR SleepyUpdatePhase friend_getNextCallPhase () const
 
UPDATEMODULE_FRIEND_DECLARATOR void friend_setNextCallFrame (UnsignedInt frame)
 
UPDATEMODULE_FRIEND_DECLARATOR Int friend_getIndexInLogic () const
 
UPDATEMODULE_FRIEND_DECLARATOR void friend_setIndexInLogic (Int i)
 
UPDATEMODULE_FRIEND_DECLARATOR const Objectfriend_getObject () const
 
- Public Member Functions inherited from BehaviorModule
 BehaviorModule (Thing *thing, const ModuleData *moduleData)
 
virtual BodyModuleInterfacegetBody ()
 
virtual CollideModuleInterfacegetCollide ()
 
virtual ContainModuleInterfacegetContain ()
 
virtual CreateModuleInterfacegetCreate ()
 
virtual DamageModuleInterfacegetDamage ()
 
virtual DestroyModuleInterfacegetDestroy ()
 
virtual SpecialPowerModuleInterfacegetSpecialPower ()
 
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 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
 
- Public Member Functions inherited from MemoryPoolObject
void deleteInstance ()
 
- Public Member Functions inherited from Snapshot
 Snapshot (void)
 
 ~Snapshot (void)
 

Static Public Member Functions

static Int getInterfaceMask ()
 
- Static Public Member Functions inherited from UpdateModule
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)
 

Additional Inherited Members

- Protected Member Functions inherited from UpdateModule
void setWakeFrame (Object *obj, UpdateSleepTime wakeDelay)
 
UpdateSleepTime getWakeFrame () const
 
virtual SleepyUpdatePhase getUpdatePhase () const
 
UpdateSleepTime frameToSleepTime (UnsignedInt frame1, UnsignedInt frame2=FOREVER, UnsignedInt frame3=FOREVER, UnsignedInt frame4=FOREVER)
 
- 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
 

Detailed Description

This module encapsulates missile behavior.

Definition at line 73 of file NeutronMissileUpdate.h.

Member Enumeration Documentation

◆ MissileStateType

Enumerator
PRELAUNCH 
LAUNCH 

released from plane, falling

ATTACK 

fly toward victim

DEAD 

Definition at line 93 of file NeutronMissileUpdate.h.

Constructor & Destructor Documentation

◆ NeutronMissileUpdate()

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

Definition at line 105 of file NeutronMissileUpdate.cpp.

Member Function Documentation

◆ getDie()

virtual DieModuleInterface * NeutronMissileUpdate::getDie ( void )
inlinevirtual

Reimplemented from BehaviorModule.

Definition at line 86 of file NeutronMissileUpdate.h.

◆ getInterfaceMask()

static Int NeutronMissileUpdate::getInterfaceMask ( void )
inlinestatic

Definition at line 83 of file NeutronMissileUpdate.h.

◆ getProjectileUpdateInterface()

virtual ProjectileUpdateInterface * NeutronMissileUpdate::getProjectileUpdateInterface ( )
inlinevirtual

Reimplemented from BehaviorModule.

Definition at line 91 of file NeutronMissileUpdate.h.

◆ getVelocity()

virtual const Coord3D * NeutronMissileUpdate::getVelocity ( ) const
inlinevirtual

get current velocity

Definition at line 106 of file NeutronMissileUpdate.h.

◆ onDelete()

void NeutronMissileUpdate::onDelete ( void )
virtual

onDelete() will be called on all modules contained by an object or drawable before the actual deletion of each of those modules happens

Reimplemented from Module.

Definition at line 138 of file NeutronMissileUpdate.cpp.

◆ onDie()

void NeutronMissileUpdate::onDie ( const DamageInfo * damageInfo)
virtual

Implements DieModuleInterface.

Definition at line 451 of file NeutronMissileUpdate.cpp.

◆ projectileFireAtObjectOrPosition()

void NeutronMissileUpdate::projectileFireAtObjectOrPosition ( const Object * victim,
const Coord3D * victimPos,
const WeaponTemplate * detWeap,
const ParticleSystemTemplate * exhaustSysOverride )
virtual

Implements ProjectileUpdateInterface.

Definition at line 167 of file NeutronMissileUpdate.cpp.

◆ projectileGetLauncherID()

virtual ObjectID NeutronMissileUpdate::projectileGetLauncherID ( ) const
inlinevirtual

Return firer of missile. Returns 0 if not yet fired.

Implements ProjectileUpdateInterface.

Definition at line 104 of file NeutronMissileUpdate.h.

◆ projectileHandleCollision()

Bool NeutronMissileUpdate::projectileHandleCollision ( Object * other)
virtual

Implements ProjectileUpdateInterface.

Definition at line 430 of file NeutronMissileUpdate.cpp.

◆ projectileIsArmed()

virtual Bool NeutronMissileUpdate::projectileIsArmed ( ) const
inlinevirtual

return true if the missile is armed and ready to explode

Implements ProjectileUpdateInterface.

Definition at line 103 of file NeutronMissileUpdate.h.

◆ projectileLaunchAtObjectOrPosition()

void NeutronMissileUpdate::projectileLaunchAtObjectOrPosition ( const Object * victim,
const Coord3D * victimPos,
const Object * launcher,
WeaponSlotType wslot,
Int specificBarrelToUse,
const WeaponTemplate * detWeap,
const ParticleSystemTemplate * exhaustSysOverride )
virtual

launch the projectile at the given victim

Implements ProjectileUpdateInterface.

Definition at line 145 of file NeutronMissileUpdate.cpp.

◆ projectileNowJammed()

virtual void NeutronMissileUpdate::projectileNowJammed ( )
inlinevirtual

Implements ProjectileUpdateInterface.

Definition at line 108 of file NeutronMissileUpdate.h.

◆ setFramesTillCountermeasureDiversionOccurs()

virtual void NeutronMissileUpdate::setFramesTillCountermeasureDiversionOccurs ( UnsignedInt frames)
inlinevirtual

Number of frames till missile diverts to countermeasures.

Implements ProjectileUpdateInterface.

Definition at line 107 of file NeutronMissileUpdate.h.

◆ update()

UpdateSleepTime NeutronMissileUpdate::update ( void )
virtual

Simulate one frame of a missile's behavior

Implements UpdateModule.

Definition at line 472 of file NeutronMissileUpdate.cpp.


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