codemp/cgame/fx_flechette.c

Go to the documentation of this file.
00001 // Golan Arms Flechette Weapon
00002 
00003 #include "cg_local.h"
00004 
00005 /*
00006 -------------------------
00007 FX_FlechetteProjectileThink
00008 -------------------------
00009 */
00010 
00011 void FX_FlechetteProjectileThink( 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.flechetteShotEffect, cent->lerpOrigin, forward, -1, -1 );
00021 }
00022 
00023 /*
00024 -------------------------
00025 FX_FlechetteWeaponHitWall
00026 -------------------------
00027 */
00028 void FX_FlechetteWeaponHitWall( vec3_t origin, vec3_t normal )
00029 {
00030         trap_FX_PlayEffectID( cgs.effects.flechetteWallImpactEffect, origin, normal, -1, -1 );
00031 }
00032 
00033 /*
00034 -------------------------
00035 FX_FlechetteWeaponHitPlayer
00036 -------------------------
00037 */
00038 void FX_FlechetteWeaponHitPlayer( vec3_t origin, vec3_t normal, qboolean humanoid )
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 }
00049 
00050 
00051 /*
00052 -------------------------
00053 FX_FlechetteProjectileThink
00054 -------------------------
00055 */
00056 
00057 void FX_FlechetteAltProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon )
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 }