doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Attributes | Private Member Functions | Private Attributes | List of all members
idProjectile Class Reference

#include <Projectile.h>

Inheritance diagram for idProjectile:
idEntity idClass idBFGProjectile idGuidedProjectile idSoulCubeMissile

Classes

struct  projectileFlags_s
 

Public Types

enum  { EVENT_DAMAGE_EFFECT = idEntity::EVENT_MAXEVENTS, EVENT_MAXEVENTS }
 
- Public Types inherited from idEntity
enum  { EVENT_STARTSOUNDSHADER, EVENT_STOPSOUNDSHADER, EVENT_MAXEVENTS }
 

Public Member Functions

 CLASS_PROTOTYPE (idProjectile)
 
 idProjectile ()
 
virtual ~idProjectile ()
 
void Spawn (void)
 
void Save (idSaveGame *savefile) const
 
void Restore (idRestoreGame *savefile)
 
void Create (idEntity *owner, const idVec3 &start, const idVec3 &dir)
 
virtual void Launch (const idVec3 &start, const idVec3 &dir, const idVec3 &pushVelocity, const float timeSinceFire=0.0f, const float launchPower=1.0f, const float dmgPower=1.0f)
 
virtual void FreeLightDef (void)
 
idEntityGetOwner (void) const
 
virtual void Think (void)
 
virtual void Killed (idEntity *inflictor, idEntity *attacker, int damage, const idVec3 &dir, int location)
 
virtual bool Collide (const trace_t &collision, const idVec3 &velocity)
 
virtual void Explode (const trace_t &collision, idEntity *ignore)
 
void Fizzle (void)
 
virtual void ClientPredictionThink (void)
 
virtual void WriteToSnapshot (idBitMsgDelta &msg) const
 
virtual void ReadFromSnapshot (const idBitMsgDelta &msg)
 
virtual bool ClientReceiveEvent (int event, int time, const idBitMsg &msg)
 
- Public Member Functions inherited from idEntity
 ABSTRACT_PROTOTYPE (idEntity)
 
 idEntity ()
 
 ~idEntity ()
 
void Spawn (void)
 
void Save (idSaveGame *savefile) const
 
void Restore (idRestoreGame *savefile)
 
const char * GetEntityDefName (void) const
 
void SetName (const char *name)
 
const char * GetName (void) const
 
virtual void UpdateChangeableSpawnArgs (const idDict *source)
 
virtual renderView_tGetRenderView ()
 
bool CheckDormant (void)
 
virtual void DormantBegin (void)
 
virtual void DormantEnd (void)
 
bool IsActive (void) const
 
void BecomeActive (int flags)
 
void BecomeInactive (int flags)
 
void UpdatePVSAreas (const idVec3 &pos)
 
virtual void Present (void)
 
virtual renderEntity_tGetRenderEntity (void)
 
virtual int GetModelDefHandle (void)
 
virtual void SetModel (const char *modelname)
 
void SetSkin (const idDeclSkin *skin)
 
const idDeclSkinGetSkin (void) const
 
void SetShaderParm (int parmnum, float value)
 
virtual void SetColor (float red, float green, float blue)
 
virtual void SetColor (const idVec3 &color)
 
virtual void GetColor (idVec3 &out) const
 
virtual void SetColor (const idVec4 &color)
 
virtual void GetColor (idVec4 &out) const
 
virtual void FreeModelDef (void)
 
virtual void Hide (void)
 
virtual void Show (void)
 
bool IsHidden (void) const
 
void UpdateVisuals (void)
 
void UpdateModel (void)
 
void UpdateModelTransform (void)
 
virtual void ProjectOverlay (const idVec3 &origin, const idVec3 &dir, float size, const char *material)
 
int GetNumPVSAreas (void)
 
const intGetPVSAreas (void)
 
void ClearPVSAreas (void)
 
bool PhysicsTeamInPVS (pvsHandle_t pvsHandle)
 
virtual bool UpdateAnimationControllers (void)
 
bool UpdateRenderEntity (renderEntity_s *renderEntity, const renderView_t *renderView)
 
virtual idAnimatorGetAnimator (void)
 
virtual bool CanPlayChatterSounds (void) const
 
bool StartSound (const char *soundName, const s_channelType channel, int soundShaderFlags, bool broadcast, int *length)
 
bool StartSoundShader (const idSoundShader *shader, const s_channelType channel, int soundShaderFlags, bool broadcast, int *length)
 
void StopSound (const s_channelType channel, bool broadcast)
 
void SetSoundVolume (float volume)
 
void UpdateSound (void)
 
int GetListenerId (void) const
 
idSoundEmitterGetSoundEmitter (void) const
 
void FreeSoundEmitter (bool immediate)
 
virtual void PreBind (void)
 
virtual void PostBind (void)
 
virtual void PreUnbind (void)
 
virtual void PostUnbind (void)
 
void JoinTeam (idEntity *teammember)
 
void Bind (idEntity *master, bool orientated)
 
void BindToJoint (idEntity *master, const char *jointname, bool orientated)
 
void BindToJoint (idEntity *master, jointHandle_t jointnum, bool orientated)
 
void BindToBody (idEntity *master, int bodyId, bool orientated)
 
void Unbind (void)
 
bool IsBound (void) const
 
bool IsBoundTo (idEntity *master) const
 
idEntityGetBindMaster (void) const
 
jointHandle_t GetBindJoint (void) const
 
int GetBindBody (void) const
 
idEntityGetTeamMaster (void) const
 
idEntityGetNextTeamEntity (void) const
 
void ConvertLocalToWorldTransform (idVec3 &offset, idMat3 &axis)
 
idVec3 GetLocalVector (const idVec3 &vec) const
 
idVec3 GetLocalCoordinates (const idVec3 &vec) const
 
idVec3 GetWorldVector (const idVec3 &vec) const
 
idVec3 GetWorldCoordinates (const idVec3 &vec) const
 
bool GetMasterPosition (idVec3 &masterOrigin, idMat3 &masterAxis) const
 
void GetWorldVelocities (idVec3 &linearVelocity, idVec3 &angularVelocity) const
 
void SetPhysics (idPhysics *phys)
 
idPhysicsGetPhysics (void) const
 
void RestorePhysics (idPhysics *phys)
 
bool RunPhysics (void)
 
void SetOrigin (const idVec3 &org)
 
void SetAxis (const idMat3 &axis)
 
void SetAngles (const idAngles &ang)
 
bool GetFloorPos (float max_dist, idVec3 &floorpos) const
 
virtual bool GetPhysicsToVisualTransform (idVec3 &origin, idMat3 &axis)
 
virtual bool GetPhysicsToSoundTransform (idVec3 &origin, idMat3 &axis)
 
virtual void GetImpactInfo (idEntity *ent, int id, const idVec3 &point, impactInfo_t *info)
 
virtual void ApplyImpulse (idEntity *ent, int id, const idVec3 &point, const idVec3 &impulse)
 
virtual void AddForce (idEntity *ent, int id, const idVec3 &point, const idVec3 &force)
 
virtual void ActivatePhysics (idEntity *ent)
 
virtual bool IsAtRest (void) const
 
virtual int GetRestStartTime (void) const
 
virtual void AddContactEntity (idEntity *ent)
 
virtual void RemoveContactEntity (idEntity *ent)
 
virtual bool CanDamage (const idVec3 &origin, idVec3 &damagePoint) const
 
virtual void Damage (idEntity *inflictor, idEntity *attacker, const idVec3 &dir, const char *damageDefName, const float damageScale, const int location)
 
virtual void AddDamageEffect (const trace_t &collision, const idVec3 &velocity, const char *damageDefName)
 
virtual void DamageFeedback (idEntity *victim, idEntity *inflictor, int &damage)
 
virtual bool Pain (idEntity *inflictor, idEntity *attacker, int damage, const idVec3 &dir, int location)
 
virtual bool ShouldConstructScriptObjectAtSpawn (void) const
 
virtual idThreadConstructScriptObject (void)
 
virtual void DeconstructScriptObject (void)
 
void SetSignal (signalNum_t signalnum, idThread *thread, const function_t *function)
 
void ClearSignal (idThread *thread, signalNum_t signalnum)
 
void ClearSignalThread (signalNum_t signalnum, idThread *thread)
 
bool HasSignal (signalNum_t signalnum) const
 
void Signal (signalNum_t signalnum)
 
void SignalEvent (idThread *thread, signalNum_t signalnum)
 
void TriggerGuis (void)
 
bool HandleGuiCommands (idEntity *entityGui, const char *cmds)
 
virtual bool HandleSingleGuiCommand (idEntity *entityGui, idLexer *src)
 
void FindTargets (void)
 
void RemoveNullTargets (void)
 
void ActivateTargets (idEntity *activator) const
 
virtual void Teleport (const idVec3 &origin, const idAngles &angles, idEntity *destination)
 
bool TouchTriggers (void) const
 
idCurve_Spline< idVec3 > * GetSpline (void) const
 
virtual void ShowEditingDialog (void)
 
virtual bool ServerReceiveEvent (int event, int time, const idBitMsg &msg)
 
void WriteBindToSnapshot (idBitMsgDelta &msg) const
 
void ReadBindFromSnapshot (const idBitMsgDelta &msg)
 
void WriteColorToSnapshot (idBitMsgDelta &msg) const
 
void ReadColorFromSnapshot (const idBitMsgDelta &msg)
 
void WriteGUIToSnapshot (idBitMsgDelta &msg) const
 
void ReadGUIFromSnapshot (const idBitMsgDelta &msg)
 
void ServerSendEvent (int eventId, const idBitMsg *msg, bool saveEvent, int excludeClient) const
 
void ClientSendEvent (int eventId, const idBitMsg *msg) const
 
- Public Member Functions inherited from idClass
 ABSTRACT_PROTOTYPE (idClass)
 
voidoperator new (size_t)
 
voidoperator new (size_t s, int, int, char *, int)
 
void operator delete (void *)
 
void operator delete (void *, int, int, char *, int)
 
virtual ~idClass ()
 
void Spawn (void)
 
void CallSpawn (void)
 
bool IsType (const idTypeInfo &c) const
 
const char * GetClassname (void) const
 
const char * GetSuperclass (void) const
 
void FindUninitializedMemory (void)
 
void Save (idSaveGame *savefile) const
 
void Restore (idRestoreGame *savefile)
 
bool RespondsTo (const idEventDef &ev) const
 
bool PostEventMS (const idEventDef *ev, int time)
 
bool PostEventMS (const idEventDef *ev, int time, idEventArg arg1)
 
bool PostEventMS (const idEventDef *ev, int time, idEventArg arg1, idEventArg arg2)
 
bool PostEventMS (const idEventDef *ev, int time, idEventArg arg1, idEventArg arg2, idEventArg arg3)
 
bool PostEventMS (const idEventDef *ev, int time, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4)
 
bool PostEventMS (const idEventDef *ev, int time, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5)
 
bool PostEventMS (const idEventDef *ev, int time, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5, idEventArg arg6)
 
bool PostEventMS (const idEventDef *ev, int time, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5, idEventArg arg6, idEventArg arg7)
 
bool PostEventMS (const idEventDef *ev, int time, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5, idEventArg arg6, idEventArg arg7, idEventArg arg8)
 
bool PostEventSec (const idEventDef *ev, float time)
 
bool PostEventSec (const idEventDef *ev, float time, idEventArg arg1)
 
bool PostEventSec (const idEventDef *ev, float time, idEventArg arg1, idEventArg arg2)
 
bool PostEventSec (const idEventDef *ev, float time, idEventArg arg1, idEventArg arg2, idEventArg arg3)
 
bool PostEventSec (const idEventDef *ev, float time, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4)
 
bool PostEventSec (const idEventDef *ev, float time, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5)
 
bool PostEventSec (const idEventDef *ev, float time, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5, idEventArg arg6)
 
bool PostEventSec (const idEventDef *ev, float time, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5, idEventArg arg6, idEventArg arg7)
 
bool PostEventSec (const idEventDef *ev, float time, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5, idEventArg arg6, idEventArg arg7, idEventArg arg8)
 
bool ProcessEvent (const idEventDef *ev)
 
bool ProcessEvent (const idEventDef *ev, idEventArg arg1)
 
bool ProcessEvent (const idEventDef *ev, idEventArg arg1, idEventArg arg2)
 
bool ProcessEvent (const idEventDef *ev, idEventArg arg1, idEventArg arg2, idEventArg arg3)
 
bool ProcessEvent (const idEventDef *ev, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4)
 
bool ProcessEvent (const idEventDef *ev, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5)
 
bool ProcessEvent (const idEventDef *ev, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5, idEventArg arg6)
 
bool ProcessEvent (const idEventDef *ev, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5, idEventArg arg6, idEventArg arg7)
 
bool ProcessEvent (const idEventDef *ev, idEventArg arg1, idEventArg arg2, idEventArg arg3, idEventArg arg4, idEventArg arg5, idEventArg arg6, idEventArg arg7, idEventArg arg8)
 
bool ProcessEventArgPtr (const idEventDef *ev, int *data)
 
void CancelEvents (const idEventDef *ev)
 
void Event_Remove (void)
 

Static Public Member Functions

static idVec3 GetVelocity (const idDict *projectile)
 
static idVec3 GetGravity (const idDict *projectile)
 
static void DefaultDamageEffect (idEntity *soundEnt, const idDict &projectileDef, const trace_t &collision, const idVec3 &velocity)
 
static bool ClientPredictionCollide (idEntity *soundEnt, const idDict &projectileDef, const trace_t &collision, const idVec3 &velocity, bool addDamageEffect)
 
- Static Public Member Functions inherited from idEntity
static bool ModelCallback (renderEntity_s *renderEntity, const renderView_t *renderView)
 
- Static Public Member Functions inherited from idClass
static void Init (void)
 
static void Shutdown (void)
 
static idTypeInfoGetClass (const char *name)
 
static void DisplayInfo_f (const idCmdArgs &args)
 
static void ListClasses_f (const idCmdArgs &args)
 
static idClassCreateInstance (const char *name)
 
static int GetNumTypes (void)
 
static int GetTypeNumBits (void)
 
static idTypeInfoGetType (int num)
 

Protected Types

enum  projectileState_t {
  SPAWNED = 0, CREATED = 1, LAUNCHED = 2, FIZZLED = 3,
  EXPLODED = 4
}
 

Protected Attributes

idEntityPtr< idEntityowner
 
struct
idProjectile::projectileFlags_s 
projectileFlags
 
float thrust
 
int thrust_end
 
float damagePower
 
renderLight_t renderLight
 
qhandle_t lightDefHandle
 
idVec3 lightOffset
 
int lightStartTime
 
int lightEndTime
 
idVec3 lightColor
 
idForce_Constant thruster
 
idPhysics_RigidBody physicsObj
 
const idDeclParticlesmokeFly
 
int smokeFlyTime
 
projectileState_t state
 
- Protected Attributes inherited from idEntity
renderEntity_t renderEntity
 
int modelDefHandle
 
refSound_t refSound
 

Private Member Functions

void AddDefaultDamageEffect (const trace_t &collision, const idVec3 &velocity)
 
void Event_Explode (void)
 
void Event_Fizzle (void)
 
void Event_RadiusDamage (idEntity *ignore)
 
void Event_Touch (idEntity *other, trace_t *trace)
 
void Event_GetProjectileState (void)
 

Private Attributes

bool netSyncPhysics
 

Additional Inherited Members

- Public Attributes inherited from idEntity
int entityNumber
 
int entityDefNumber
 
idLinkList< idEntityspawnNode
 
idLinkList< idEntityactiveNode
 
idLinkList< idEntitysnapshotNode
 
int snapshotSequence
 
int snapshotBits
 
idStr name
 
idDict spawnArgs
 
idScriptObject scriptObject
 
int thinkFlags
 
int dormantStart
 
bool cinematic
 
renderView_trenderView
 
idEntitycameraTarget
 
idList< idEntityPtr< idEntity > > targets
 
int health
 
struct idEntity::entityFlags_s fl
 
- Static Public Attributes inherited from idEntity
static const int MAX_PVS_AREAS = 4
 

Detailed Description

Definition at line 42 of file Projectile.h.

Member Enumeration Documentation

anonymous enum
Enumerator
EVENT_DAMAGE_EFFECT 
EVENT_MAXEVENTS 

Definition at line 76 of file Projectile.h.

Enumerator
SPAWNED 
CREATED 
LAUNCHED 
FIZZLED 
EXPLODED 

Definition at line 120 of file Projectile.h.

Constructor & Destructor Documentation

END_CLASS idProjectile::idProjectile ( void  )

Definition at line 76 of file Projectile.cpp.

idProjectile::~idProjectile ( )
virtual

Definition at line 284 of file Projectile.cpp.

Member Function Documentation

void idProjectile::AddDefaultDamageEffect ( const trace_t collision,
const idVec3 velocity 
)
private

Definition at line 696 of file Projectile.cpp.

idProjectile::CLASS_PROTOTYPE ( idProjectile  )
bool idProjectile::ClientPredictionCollide ( idEntity soundEnt,
const idDict projectileDef,
const trace_t collision,
const idVec3 velocity,
bool  addDamageEffect 
)
static

Definition at line 1195 of file Projectile.cpp.

void idProjectile::ClientPredictionThink ( void  )
virtual

Reimplemented from idEntity.

Definition at line 1240 of file Projectile.cpp.

bool idProjectile::ClientReceiveEvent ( int  event,
int  time,
const idBitMsg msg 
)
virtual

Reimplemented from idEntity.

Definition at line 1363 of file Projectile.cpp.

bool idProjectile::Collide ( const trace_t collision,
const idVec3 velocity 
)
virtual

Reimplemented from idEntity.

Definition at line 530 of file Projectile.cpp.

void idProjectile::Create ( idEntity owner,
const idVec3 start,
const idVec3 dir 
)

Definition at line 218 of file Projectile.cpp.

void idProjectile::DefaultDamageEffect ( idEntity soundEnt,
const idDict projectileDef,
const trace_t collision,
const idVec3 velocity 
)
static

Definition at line 656 of file Projectile.cpp.

void idProjectile::Event_Explode ( void  )
private

Definition at line 1070 of file Projectile.cpp.

void idProjectile::Event_Fizzle ( void  )
private

Definition at line 1087 of file Projectile.cpp.

void idProjectile::Event_GetProjectileState ( void  )
private

Definition at line 808 of file Projectile.cpp.

void idProjectile::Event_RadiusDamage ( idEntity ignore)
private

Definition at line 796 of file Projectile.cpp.

void idProjectile::Event_Touch ( idEntity other,
trace_t trace 
)
private

Definition at line 1096 of file Projectile.cpp.

void idProjectile::Explode ( const trace_t collision,
idEntity ignore 
)
virtual

Reimplemented in idBFGProjectile.

Definition at line 817 of file Projectile.cpp.

void idProjectile::Fizzle ( void  )

Definition at line 752 of file Projectile.cpp.

void idProjectile::FreeLightDef ( void  )
virtual

Reimplemented from idEntity.

Definition at line 294 of file Projectile.cpp.

idVec3 idProjectile::GetGravity ( const idDict projectile)
static

Definition at line 1058 of file Projectile.cpp.

idEntity * idProjectile::GetOwner ( void  ) const

Definition at line 209 of file Projectile.cpp.

idVec3 idProjectile::GetVelocity ( const idDict projectile)
static

Definition at line 1046 of file Projectile.cpp.

void idProjectile::Killed ( idEntity inflictor,
idEntity attacker,
int  damage,
const idVec3 dir,
int  location 
)
virtual

Reimplemented from idEntity.

Definition at line 730 of file Projectile.cpp.

void idProjectile::Launch ( const idVec3 start,
const idVec3 dir,
const idVec3 pushVelocity,
const float  timeSinceFire = 0.0f,
const float  launchPower = 1.0f,
const float  dmgPower = 1.0f 
)
virtual

Reimplemented in idBFGProjectile, idSoulCubeMissile, and idGuidedProjectile.

Definition at line 306 of file Projectile.cpp.

void idProjectile::ReadFromSnapshot ( const idBitMsgDelta msg)
virtual

Reimplemented from idEntity.

Definition at line 1279 of file Projectile.cpp.

void idProjectile::Restore ( idRestoreGame savefile)

Definition at line 156 of file Projectile.cpp.

void idProjectile::Save ( idSaveGame savefile) const

Definition at line 118 of file Projectile.cpp.

void idProjectile::Spawn ( void  )

Definition at line 104 of file Projectile.cpp.

void idProjectile::Think ( void  )
virtual

Reimplemented from idEntity.

Reimplemented in idBFGProjectile, idSoulCubeMissile, and idGuidedProjectile.

Definition at line 476 of file Projectile.cpp.

void idProjectile::WriteToSnapshot ( idBitMsgDelta msg) const
virtual

Reimplemented from idEntity.

Definition at line 1252 of file Projectile.cpp.

Member Data Documentation

float idProjectile::damagePower
protected

Definition at line 101 of file Projectile.h.

idVec3 idProjectile::lightColor
protected

Definition at line 108 of file Projectile.h.

qhandle_t idProjectile::lightDefHandle
protected

Definition at line 104 of file Projectile.h.

int idProjectile::lightEndTime
protected

Definition at line 107 of file Projectile.h.

idVec3 idProjectile::lightOffset
protected

Definition at line 105 of file Projectile.h.

int idProjectile::lightStartTime
protected

Definition at line 106 of file Projectile.h.

bool idProjectile::netSyncPhysics
private

Definition at line 132 of file Projectile.h.

idEntityPtr<idEntity> idProjectile::owner
protected

Definition at line 89 of file Projectile.h.

idPhysics_RigidBody idProjectile::physicsObj
protected

Definition at line 111 of file Projectile.h.

struct idProjectile::projectileFlags_s idProjectile::projectileFlags
protected
renderLight_t idProjectile::renderLight
protected

Definition at line 103 of file Projectile.h.

const idDeclParticle* idProjectile::smokeFly
protected

Definition at line 113 of file Projectile.h.

int idProjectile::smokeFlyTime
protected

Definition at line 114 of file Projectile.h.

projectileState_t idProjectile::state
protected

Definition at line 129 of file Projectile.h.

float idProjectile::thrust
protected

Definition at line 99 of file Projectile.h.

int idProjectile::thrust_end
protected

Definition at line 100 of file Projectile.h.

idForce_Constant idProjectile::thruster
protected

Definition at line 110 of file Projectile.h.


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