codemp/cgame/fx_blaster.c File Reference

#include "cg_local.h"

Go to the source code of this file.

Functions

void FX_BlasterProjectileThink (centity_t *cent, const struct weaponInfo_s *weapon)
void FX_BlasterAltFireThink (centity_t *cent, const struct weaponInfo_s *weapon)
void FX_BlasterWeaponHitWall (vec3_t origin, vec3_t normal)
void FX_BlasterWeaponHitPlayer (vec3_t origin, vec3_t normal, qboolean humanoid)


Function Documentation

void FX_BlasterAltFireThink centity_t cent,
const struct weaponInfo_s weapon
 

Definition at line 28 of file fx_blaster.c.

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

00029 {
00030         vec3_t forward;
00031 
00032         if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f )
00033         {
00034                 forward[2] = 1.0f;
00035         }
00036 
00037         trap_FX_PlayEffectID( cgs.effects.blasterShotEffect, cent->lerpOrigin, forward, -1, -1 );
00038 }

void FX_BlasterProjectileThink centity_t cent,
const struct weaponInfo_s weapon
 

Definition at line 11 of file fx_blaster.c.

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

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.blasterShotEffect, cent->lerpOrigin, forward, -1, -1 );
00021 }

void FX_BlasterWeaponHitPlayer vec3_t  origin,
vec3_t  normal,
qboolean  humanoid
 

Definition at line 55 of file fx_blaster.c.

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

Referenced by CG_MissileHitPlayer().

00056 {
00057         if ( humanoid )
00058         {
00059                 trap_FX_PlayEffectID( cgs.effects.blasterFleshImpactEffect, origin, normal, -1, -1 );
00060         }
00061         else
00062         {
00063                 trap_FX_PlayEffectID( cgs.effects.blasterDroidImpactEffect, origin, normal, -1, -1 );
00064         }
00065 }

void FX_BlasterWeaponHitWall vec3_t  origin,
vec3_t  normal
 

Definition at line 45 of file fx_blaster.c.

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

Referenced by CG_MissileHitWall().

00046 {
00047         trap_FX_PlayEffectID( cgs.effects.blasterWallImpactEffect, origin, normal, -1, -1 );
00048 }