codemp/cgame/fx_bowcaster.c

Go to the documentation of this file.
00001 // Bowcaster Weapon
00002 
00003 #include "cg_local.h"
00004 
00005 /*
00006 ---------------------------
00007 FX_BowcasterProjectileThink
00008 ---------------------------
00009 */
00010 
00011 void FX_BowcasterProjectileThink( 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.bowcasterShotEffect, cent->lerpOrigin, forward, -1, -1 );
00021 }
00022 
00023 /*
00024 ---------------------------
00025 FX_BowcasterHitWall
00026 ---------------------------
00027 */
00028 
00029 void FX_BowcasterHitWall( vec3_t origin, vec3_t normal )
00030 {
00031         trap_FX_PlayEffectID( cgs.effects.bowcasterImpactEffect, origin, normal, -1, -1 );
00032 }
00033 
00034 /*
00035 ---------------------------
00036 FX_BowcasterHitPlayer
00037 ---------------------------
00038 */
00039 
00040 void FX_BowcasterHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid )
00041 {
00042         trap_FX_PlayEffectID( cgs.effects.bowcasterImpactEffect, origin, normal, -1, -1 );
00043 }
00044 
00045 /*
00046 ------------------------------
00047 FX_BowcasterAltProjectileThink
00048 ------------------------------
00049 */
00050 
00051 void FX_BowcasterAltProjectileThink( 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.bowcasterShotEffect, cent->lerpOrigin, forward, -1, -1 );
00061 }
00062