codemp/cgame/fx_flechette.c File Reference

#include "cg_local.h"

Go to the source code of this file.

Functions

void FX_FlechetteProjectileThink (centity_t *cent, const struct weaponInfo_s *weapon)
void FX_FlechetteWeaponHitWall (vec3_t origin, vec3_t normal)
void FX_FlechetteWeaponHitPlayer (vec3_t origin, vec3_t normal, qboolean humanoid)
void FX_FlechetteAltProjectileThink (centity_t *cent, const struct weaponInfo_s *weapon)


Function Documentation

void FX_FlechetteAltProjectileThink centity_t cent,
const struct weaponInfo_s weapon
 

Definition at line 57 of file fx_flechette.c.

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

Referenced by CG_RegisterWeapon().

00058 {
00059         vec3_t forward;
00060 
00061         if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f )
00062         {
00063                 forward[2] = 1.0f;
00064         }
00065 
00066         trap_FX_PlayEffectID( cgs.effects.flechetteAltShotEffect, cent->lerpOrigin, forward, -1, -1 );
00067 }

void FX_FlechetteProjectileThink centity_t cent,
const struct weaponInfo_s weapon
 

Definition at line 11 of file fx_flechette.c.

References centity_t, cgs, centity_s::currentState, cgs_t::effects, cgEffects_t::flechetteShotEffect, centity_s::lerpOrigin, entityState_s::pos, 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.flechetteShotEffect, cent->lerpOrigin, forward, -1, -1 );
00021 }

void FX_FlechetteWeaponHitPlayer vec3_t  origin,
vec3_t  normal,
qboolean  humanoid
 

Definition at line 38 of file fx_flechette.c.

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

Referenced by CG_MissileHitPlayer().

00039 {
00040 //      if ( humanoid )
00041 //      {
00042                 trap_FX_PlayEffectID( cgs.effects.flechetteFleshImpactEffect, origin, normal, -1, -1 );
00043 //      }
00044 //      else
00045 //      {
00046 //              trap_FX_PlayEffect( "blaster/droid_impact", origin, normal );
00047 //      }
00048 }

void FX_FlechetteWeaponHitWall vec3_t  origin,
vec3_t  normal
 

Definition at line 28 of file fx_flechette.c.

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

Referenced by CG_MissileHitWall().

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