codemp/cgame/fx_rocketlauncher.c

Go to the documentation of this file.
00001 // Rocket Launcher Weapon
00002 
00003 #include "cg_local.h"
00004 
00005 /*
00006 ---------------------------
00007 FX_RocketProjectileThink
00008 ---------------------------
00009 */
00010 
00011 void FX_RocketProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon )
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 }
00022 
00023 /*
00024 ---------------------------
00025 FX_RocketHitWall
00026 ---------------------------
00027 */
00028 
00029 void FX_RocketHitWall( vec3_t origin, vec3_t normal )
00030 {
00031         trap_FX_PlayEffectID( cgs.effects.rocketExplosionEffect, origin, normal, -1, -1 );
00032 }
00033 
00034 /*
00035 ---------------------------
00036 FX_RocketHitPlayer
00037 ---------------------------
00038 */
00039 
00040 void FX_RocketHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid )
00041 {
00042         trap_FX_PlayEffectID( cgs.effects.rocketExplosionEffect, origin, normal, -1, -1 );
00043 }
00044 
00045 /*
00046 ---------------------------
00047 FX_RocketAltProjectileThink
00048 ---------------------------
00049 */
00050 
00051 void FX_RocketAltProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon )
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 }