codemp/cgame/fx_rocketlauncher.c File Reference

#include "cg_local.h"

Go to the source code of this file.

Functions

void FX_RocketProjectileThink (centity_t *cent, const struct weaponInfo_s *weapon)
void FX_RocketHitWall (vec3_t origin, vec3_t normal)
void FX_RocketHitPlayer (vec3_t origin, vec3_t normal, qboolean humanoid)
void FX_RocketAltProjectileThink (centity_t *cent, const struct weaponInfo_s *weapon)


Function Documentation

void FX_RocketAltProjectileThink centity_t cent,
const struct weaponInfo_s weapon
 

Definition at line 51 of file fx_rocketlauncher.c.

References centity_t, cgs, centity_s::currentState, cgs_t::effects, centity_s::lerpOrigin, entityState_s::pos, cgEffects_t::rocketShotEffect, trap_FX_PlayEffectID(), trajectory_t::trDelta, vec3_t, and VectorNormalize2().

Referenced by CG_RegisterWeapon().

00052 {
00053         vec3_t forward;
00054 
00055         if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f )
00056         {
00057                 forward[2] = 1.0f;
00058         }
00059 
00060         trap_FX_PlayEffectID( cgs.effects.rocketShotEffect, cent->lerpOrigin, forward, -1, -1 );
00061 }

void FX_RocketHitPlayer vec3_t  origin,
vec3_t  normal,
qboolean  humanoid
 

Definition at line 40 of file fx_rocketlauncher.c.

References cgs, cgs_t::effects, cgEffects_t::rocketExplosionEffect, trap_FX_PlayEffectID(), and vec3_t.

Referenced by CG_MissileHitPlayer().

00041 {
00042         trap_FX_PlayEffectID( cgs.effects.rocketExplosionEffect, origin, normal, -1, -1 );
00043 }

void FX_RocketHitWall vec3_t  origin,
vec3_t  normal
 

Definition at line 29 of file fx_rocketlauncher.c.

References cgs, cgs_t::effects, cgEffects_t::rocketExplosionEffect, trap_FX_PlayEffectID(), and vec3_t.

Referenced by CG_MissileHitWall().

00030 {
00031         trap_FX_PlayEffectID( cgs.effects.rocketExplosionEffect, origin, normal, -1, -1 );
00032 }

void FX_RocketProjectileThink centity_t cent,
const struct weaponInfo_s weapon
 

Definition at line 11 of file fx_rocketlauncher.c.

References centity_t, cgs, centity_s::currentState, cgs_t::effects, centity_s::lerpOrigin, entityState_s::pos, cgEffects_t::rocketShotEffect, trap_FX_PlayEffectID(), trajectory_t::trDelta, vec3_t, and VectorNormalize2().

Referenced by CG_RegisterWeapon().

00012 {
00013         vec3_t forward;
00014 
00015         if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f )
00016         {
00017                 forward[2] = 1.0f;
00018         }
00019 
00020         trap_FX_PlayEffectID( cgs.effects.rocketShotEffect, cent->lerpOrigin, forward, -1, -1 );
00021 }