codemp/cgame/fx_local.h File Reference

Go to the source code of this file.

Defines

#define FX_ALPHA_LINEAR   0x00000001
#define FX_SIZE_LINEAR   0x00000100

Functions

void FX_BryarProjectileThink (centity_t *cent, const struct weaponInfo_s *weapon)
void FX_BryarAltProjectileThink (centity_t *cent, const struct weaponInfo_s *weapon)
void FX_BryarHitWall (vec3_t origin, vec3_t normal)
void FX_BryarAltHitWall (vec3_t origin, vec3_t normal, int power)
void FX_BryarHitPlayer (vec3_t origin, vec3_t normal, qboolean humanoid)
void FX_BryarAltHitPlayer (vec3_t origin, vec3_t normal, qboolean humanoid)
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)
void FX_DisruptorMainShot (vec3_t start, vec3_t end)
void FX_DisruptorAltShot (vec3_t start, vec3_t end, qboolean fullCharge)
void FX_DisruptorAltMiss (vec3_t origin, vec3_t normal)
void FX_DisruptorAltHit (vec3_t origin, vec3_t normal)
void FX_DisruptorHitWall (vec3_t origin, vec3_t normal)
void FX_DisruptorHitPlayer (vec3_t origin, vec3_t normal, qboolean humanoid)
void FX_BowcasterProjectileThink (centity_t *cent, const struct weaponInfo_s *weapon)
void FX_BowcasterAltProjectileThink (centity_t *cent, const struct weaponInfo_s *weapon)
void FX_BowcasterHitWall (vec3_t origin, vec3_t normal)
void FX_BowcasterHitPlayer (vec3_t origin, vec3_t normal, qboolean humanoid)
void FX_RepeaterProjectileThink (centity_t *cent, const struct weaponInfo_s *weapon)
void FX_RepeaterAltProjectileThink (centity_t *cent, const struct weaponInfo_s *weapon)
void FX_RepeaterHitWall (vec3_t origin, vec3_t normal)
void FX_RepeaterAltHitWall (vec3_t origin, vec3_t normal)
void FX_RepeaterHitPlayer (vec3_t origin, vec3_t normal, qboolean humanoid)
void FX_RepeaterAltHitPlayer (vec3_t origin, vec3_t normal, qboolean humanoid)
void FX_DEMP2_ProjectileThink (centity_t *cent, const struct weaponInfo_s *weapon)
void FX_DEMP2_HitWall (vec3_t origin, vec3_t normal)
void FX_DEMP2_HitPlayer (vec3_t origin, vec3_t normal, qboolean humanoid)
void FX_DEMP2_AltDetonate (vec3_t org, float size)
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)
void FX_RocketProjectileThink (centity_t *cent, const struct weaponInfo_s *weapon)
void FX_RocketAltProjectileThink (centity_t *cent, const struct weaponInfo_s *weapon)
void FX_RocketHitWall (vec3_t origin, vec3_t normal)
void FX_RocketHitPlayer (vec3_t origin, vec3_t normal, qboolean humanoid)


Define Documentation

#define FX_ALPHA_LINEAR   0x00000001
 

Definition at line 6 of file fx_local.h.

Referenced by FX_ConcAltShot(), FX_DisruptorAltShot(), and FX_DisruptorMainShot().

#define FX_SIZE_LINEAR   0x00000100
 

Definition at line 7 of file fx_local.h.

Referenced by FX_ConcAltShot(), FX_DisruptorAltShot(), and FX_DisruptorMainShot().


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 }

void FX_BowcasterAltProjectileThink centity_t cent,
const struct weaponInfo_s weapon
 

Definition at line 51 of file fx_bowcaster.c.

References cgEffects_t::bowcasterShotEffect, 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().

Referenced by CG_RegisterWeapon().

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 }

void FX_BowcasterHitPlayer vec3_t  origin,
vec3_t  normal,
qboolean  humanoid
 

Definition at line 40 of file fx_bowcaster.c.

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

Referenced by CG_MissileHitPlayer().

00041 {
00042         trap_FX_PlayEffectID( cgs.effects.bowcasterImpactEffect, origin, normal, -1, -1 );
00043 }

void FX_BowcasterHitWall vec3_t  origin,
vec3_t  normal
 

Definition at line 29 of file fx_bowcaster.c.

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

Referenced by CG_MissileHitWall().

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

void FX_BowcasterProjectileThink centity_t cent,
const struct weaponInfo_s weapon
 

Definition at line 11 of file fx_bowcaster.c.

References cgEffects_t::bowcasterShotEffect, 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().

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

void FX_BryarAltHitPlayer vec3_t  origin,
vec3_t  normal,
qboolean  humanoid
 

Definition at line 116 of file fx_bryarpistol.c.

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

Referenced by CG_MissileHitPlayer().

00117 {
00118         if ( humanoid )
00119         {
00120                 trap_FX_PlayEffectID( cgs.effects.bryarFleshImpactEffect, origin, normal, -1, -1 );
00121         }
00122         else
00123         {
00124                 trap_FX_PlayEffectID( cgs.effects.bryarDroidImpactEffect, origin, normal, -1, -1 );
00125         }
00126 }

void FX_BryarAltHitWall vec3_t  origin,
vec3_t  normal,
int  power
 

Definition at line 91 of file fx_bryarpistol.c.

References cgEffects_t::bryarWallImpactEffect, cgEffects_t::bryarWallImpactEffect2, cgEffects_t::bryarWallImpactEffect3, cgs, cgs_t::effects, trap_FX_PlayEffectID(), and vec3_t.

Referenced by CG_MissileHitWall().

00092 {
00093         switch( power )
00094         {
00095         case 4:
00096         case 5:
00097                 trap_FX_PlayEffectID( cgs.effects.bryarWallImpactEffect3, origin, normal, -1, -1 );
00098                 break;
00099 
00100         case 2:
00101         case 3:
00102                 trap_FX_PlayEffectID( cgs.effects.bryarWallImpactEffect2, origin, normal, -1, -1 );
00103                 break;
00104 
00105         default:
00106                 trap_FX_PlayEffectID( cgs.effects.bryarWallImpactEffect, origin, normal, -1, -1 );
00107                 break;
00108         }
00109 }

void FX_BryarAltProjectileThink centity_t cent,
const struct weaponInfo_s weapon
 

Definition at line 64 of file fx_bryarpistol.c.

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

Referenced by CG_RegisterWeapon().

00065 {
00066         vec3_t forward;
00067         int t;
00068 
00069         if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f )
00070         {
00071                 forward[2] = 1.0f;
00072         }
00073 
00074         // see if we have some sort of extra charge going on
00075         for (t = 1; t < cent->currentState.generic1; t++ )
00076         {
00077                 // just add ourselves over, and over, and over when we are charged
00078                 trap_FX_PlayEffectID( cgs.effects.bryarPowerupShotEffect, cent->lerpOrigin, forward, -1, -1 );
00079         }
00080 
00081         //      for ( int t = 1; t < cent->gent->count; t++ )   // The single player stores the charge in count, which isn't accessible on the client
00082 
00083         trap_FX_PlayEffectID( cgs.effects.bryarShotEffect, cent->lerpOrigin, forward, -1, -1 );
00084 }

void FX_BryarHitPlayer vec3_t  origin,
vec3_t  normal,
qboolean  humanoid
 

Definition at line 42 of file fx_bryarpistol.c.

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

Referenced by CG_MissileHitPlayer().

00043 {
00044         if ( humanoid )
00045         {
00046                 trap_FX_PlayEffectID( cgs.effects.bryarFleshImpactEffect, origin, normal, -1, -1 );
00047         }
00048         else
00049         {
00050                 trap_FX_PlayEffectID( cgs.effects.bryarDroidImpactEffect, origin, normal, -1, -1 );
00051         }
00052 }

void FX_BryarHitWall vec3_t  origin,
vec3_t  normal
 

Definition at line 32 of file fx_bryarpistol.c.

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

Referenced by CG_MissileHitWall().

00033 {
00034         trap_FX_PlayEffectID( cgs.effects.bryarWallImpactEffect, origin, normal, -1, -1 );
00035 }

void FX_BryarProjectileThink centity_t cent,
const struct weaponInfo_s weapon
 

Definition at line 15 of file fx_bryarpistol.c.

References cgEffects_t::bryarShotEffect, 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().

Referenced by CG_RegisterWeapon().

00016 {
00017         vec3_t forward;
00018 
00019         if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f )
00020         {
00021                 forward[2] = 1.0f;
00022         }
00023 
00024         trap_FX_PlayEffectID( cgs.effects.bryarShotEffect, cent->lerpOrigin, forward, -1, -1 );
00025 }

void FX_DEMP2_AltDetonate vec3_t  org,
float  size
 

Definition at line 240 of file fx_demp2.c.

References cg, CG_AllocLocalEntity(), cgs, localEntity_s::color, refEntity_t::customShader, cgMedia_t::demp2Shell, cgMedia_t::demp2ShellShader, localEntity_s::endTime, refEntity_t::hModel, LE_FADE_SCALE_MODEL, localEntity_s::leType, localEntity_t, cgs_t::media, memset(), refEntity_t::origin, localEntity_s::radius, localEntity_s::refEntity, refEntity_t::renderfx, RF_VOLUMETRIC, localEntity_s::startTime, cg_t::time, vec3_t, and VectorCopy.

Referenced by CG_EntityEvent().

00241 {
00242         localEntity_t   *ex;
00243 
00244         ex = CG_AllocLocalEntity();
00245         ex->leType = LE_FADE_SCALE_MODEL;
00246         memset( &ex->refEntity, 0, sizeof( refEntity_t ));
00247 
00248         ex->refEntity.renderfx |= RF_VOLUMETRIC;
00249 
00250         ex->startTime = cg.time;
00251         ex->endTime = ex->startTime + 800;//1600;
00252         
00253         ex->radius = size;
00254         ex->refEntity.customShader = cgs.media.demp2ShellShader;
00255         ex->refEntity.hModel = cgs.media.demp2Shell;
00256         VectorCopy( org, ex->refEntity.origin );
00257                 
00258         ex->color[0] = ex->color[1] = ex->color[2] = 255.0f;
00259 }

void FX_DEMP2_HitPlayer vec3_t  origin,
vec3_t  normal,
qboolean  humanoid
 

Definition at line 40 of file fx_demp2.c.

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

Referenced by CG_MissileHitPlayer().

00041 {
00042         trap_FX_PlayEffectID( cgs.effects.demp2FleshImpactEffect, origin, normal, -1, -1 );
00043 }

void FX_DEMP2_HitWall vec3_t  origin,
vec3_t  normal
 

Definition at line 29 of file fx_demp2.c.

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

Referenced by CG_MissileHitWall().

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

void FX_DEMP2_ProjectileThink centity_t cent,
const struct weaponInfo_s weapon
 

Definition at line 11 of file fx_demp2.c.

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

void FX_DisruptorAltHit vec3_t  origin,
vec3_t  normal
 

Definition at line 121 of file fx_disruptor.c.

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

Referenced by CG_MissileHitPlayer().

00122 {
00123         trap_FX_PlayEffectID( cgs.effects.disruptorAltHitEffect, origin, normal, -1, -1 );
00124 }

void FX_DisruptorAltMiss vec3_t  origin,
vec3_t  normal
 

Definition at line 70 of file fx_disruptor.c.

References addbezierArgStruct_t, addbezierArgStruct_s::alpha1, addbezierArgStruct_s::alpha2, addbezierArgStruct_s::alphaParm, cgs, addbezierArgStruct_s::control1, addbezierArgStruct_s::control1Vel, addbezierArgStruct_s::control2, addbezierArgStruct_s::control2Vel, cgEffects_t::disruptorAltMissEffect, cgs_t::effects, addbezierArgStruct_s::end, addbezierArgStruct_s::eRGB, addbezierArgStruct_s::flags, FX_ALPHA_WAVE, addbezierArgStruct_s::killTime, addbezierArgStruct_s::rgbParm, addbezierArgStruct_s::shader, addbezierArgStruct_s::size1, addbezierArgStruct_s::size2, addbezierArgStruct_s::sizeParm, addbezierArgStruct_s::sRGB, addbezierArgStruct_s::start, trap_FX_AddBezier(), trap_FX_PlayEffectID(), trap_R_RegisterShader(), vec3_origin, vec3_t, VectorAdd, VectorCopy, and VectorMA.

Referenced by CG_EntityEvent(), and CG_MissileHitWall().

00071 {
00072         vec3_t pos, c1, c2;
00073         addbezierArgStruct_t b;
00074 
00075         VectorMA( origin, 4.0f, normal, c1 );
00076         VectorCopy( c1, c2 );
00077         c1[2] += 4;
00078         c2[2] += 12;
00079         
00080         VectorAdd( origin, normal, pos );
00081         pos[2] += 28;
00082 
00083         /*
00084         FX_AddBezier( origin, pos, c1, vec3_origin, c2, vec3_origin, 6.0f, 6.0f, 0.0f, 0.0f, 0.2f, 0.5f,
00085         WHITE, WHITE, 0.0f, 4000, trap_R_RegisterShader( "gfx/effects/smokeTrail" ), FX_ALPHA_WAVE );
00086         */
00087 
00088         VectorCopy(origin, b.start);
00089         VectorCopy(pos, b.end);
00090         VectorCopy(c1, b.control1);
00091         VectorCopy(vec3_origin, b.control1Vel);
00092         VectorCopy(c2, b.control2);
00093         VectorCopy(vec3_origin, b.control2Vel);
00094 
00095         b.size1 = 6.0f;
00096         b.size2 = 6.0f;
00097         b.sizeParm = 0.0f;
00098         b.alpha1 = 0.0f;
00099         b.alpha2 = 0.2f;
00100         b.alphaParm = 0.5f;
00101         
00102         VectorCopy(WHITE, b.sRGB);
00103         VectorCopy(WHITE, b.eRGB);
00104 
00105         b.rgbParm = 0.0f;
00106         b.killTime = 4000;
00107         b.shader = trap_R_RegisterShader( "gfx/effects/smokeTrail" );
00108         b.flags = FX_ALPHA_WAVE;
00109 
00110         trap_FX_AddBezier(&b);
00111 
00112         trap_FX_PlayEffectID( cgs.effects.disruptorAltMissEffect, origin, normal, -1, -1 );
00113 }

void FX_DisruptorAltShot vec3_t  start,
vec3_t  end,
qboolean  fullCharge
 

Definition at line 41 of file fx_disruptor.c.

References FX_ALPHA_LINEAR, FX_SIZE_LINEAR, trap_FX_AddLine(), trap_R_RegisterShader(), and vec3_t.

Referenced by CG_EntityEvent().

00042 {
00043         trap_FX_AddLine( start, end, 0.1f, 10.0f, 0.0f, 
00044                                                         1.0f, 0.0f, 0.0f,
00045                                                         WHITE, WHITE, 0.0f,
00046                                                         175, trap_R_RegisterShader( "gfx/effects/redLine" ), 
00047                                                         FX_SIZE_LINEAR | FX_ALPHA_LINEAR );
00048 
00049         if ( fullCharge )
00050         {
00051                 vec3_t  YELLER={0.8f,0.7f,0.0f};
00052 
00053                 // add some beef
00054                 trap_FX_AddLine( start, end, 0.1f, 7.0f, 0.0f, 
00055                                                         1.0f, 0.0f, 0.0f,
00056                                                         YELLER, YELLER, 0.0f,
00057                                                         150, trap_R_RegisterShader( "gfx/misc/whiteline2" ), 
00058                                                         FX_SIZE_LINEAR | FX_ALPHA_LINEAR );
00059         }
00060 }

void FX_DisruptorHitPlayer vec3_t  origin,
vec3_t  normal,
qboolean  humanoid
 

Definition at line 145 of file fx_disruptor.c.

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

Referenced by CG_EntityEvent().

00146 {
00147         trap_FX_PlayEffectID( cgs.effects.disruptorFleshImpactEffect, origin, normal, -1, -1 );
00148 }

void FX_DisruptorHitWall vec3_t  origin,
vec3_t  normal
 

Definition at line 134 of file fx_disruptor.c.

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

Referenced by CG_EntityEvent().

00135 {
00136         trap_FX_PlayEffectID( cgs.effects.disruptorWallImpactEffect, origin, normal, -1, -1 );
00137 }

void FX_DisruptorMainShot vec3_t  start,
vec3_t  end
 

Definition at line 13 of file fx_disruptor.c.

References FX_ALPHA_LINEAR, FX_SIZE_LINEAR, trap_FX_AddLine(), trap_R_RegisterShader(), and vec3_t.

Referenced by CG_EntityEvent().

00014 {
00015 //      vec3_t  dir;
00016 //      float   len;
00017 
00018         trap_FX_AddLine( start, end, 0.1f, 6.0f, 0.0f, 
00019                                                         1.0f, 0.0f, 0.0f,
00020                                                         WHITE, WHITE, 0.0f,
00021                                                         150, trap_R_RegisterShader( "gfx/effects/redLine" ), 
00022                                                         FX_SIZE_LINEAR | FX_ALPHA_LINEAR );
00023 
00024 //      VectorSubtract( end, start, dir );
00025 //      len = VectorNormalize( dir );
00026 
00027 //      FX_AddCylinder( start, dir, 5.0f, 5.0f, 0.0f,
00028 //                                                              5.0f, 5.0f, 0.0f,
00029 //                                                              len, len, 0.0f,
00030 //                                                              1.0f, 1.0f, 0.0f,
00031 //                                                              WHITE, WHITE, 0.0f,
00032 //                                                              400, cgi_R_RegisterShader( "gfx/effects/spiral" ), 0 );
00033 }

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 }

void FX_RepeaterAltHitPlayer vec3_t  origin,
vec3_t  normal,
qboolean  humanoid
 

Definition at line 152 of file fx_heavyrepeater.c.

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

Referenced by CG_MissileHitPlayer().

00153 {
00154         trap_FX_PlayEffectID( cgs.effects.repeaterAltWallImpactEffect, origin, normal, -1, -1 );
00155 }

void FX_RepeaterAltHitWall vec3_t  origin,
vec3_t  normal
 

Definition at line 141 of file fx_heavyrepeater.c.

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

Referenced by CG_MissileHitWall().

00142 {
00143         trap_FX_PlayEffectID( cgs.effects.repeaterAltWallImpactEffect, origin, normal, -1, -1 );
00144 }

void FX_RepeaterAltProjectileThink centity_t cent,
const struct weaponInfo_s weapon
 

Definition at line 119 of file fx_heavyrepeater.c.

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

Referenced by CG_RegisterWeapon().

00120 {
00121         vec3_t forward;
00122 
00123         if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f )
00124         {
00125                 forward[2] = 1.0f;
00126         }
00127 
00128         if (cg_repeaterOrb.integer)
00129         {
00130                 CG_DistortionOrb(cent);
00131         }
00132         trap_FX_PlayEffectID( cgs.effects.repeaterAltProjectileEffect, cent->lerpOrigin, forward, -1, -1 );
00133 }

void FX_RepeaterHitPlayer vec3_t  origin,
vec3_t  normal,
qboolean  humanoid
 

Definition at line 40 of file fx_heavyrepeater.c.

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

Referenced by CG_MissileHitPlayer().

00041 {
00042         trap_FX_PlayEffectID( cgs.effects.repeaterFleshImpactEffect, origin, normal, -1, -1 );
00043 }

void FX_RepeaterHitWall vec3_t  origin,
vec3_t  normal
 

Definition at line 29 of file fx_heavyrepeater.c.

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

Referenced by CG_MissileHitWall().

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

void FX_RepeaterProjectileThink centity_t cent,
const struct weaponInfo_s weapon
 

Definition at line 11 of file fx_heavyrepeater.c.

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

void FX_RocketAltProjectileThink centity_t cent,
const struct weaponInfo_s weapon
 

Definition at line 51 of file fx_rocketlauncher.c.

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

Referenced by CG_RegisterWeapon().

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 }

void FX_RocketHitPlayer vec3_t  origin,
vec3_t  normal,
qboolean  humanoid
 

Definition at line 40 of file fx_rocketlauncher.c.

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

Referenced by CG_MissileHitPlayer().

00041 {
00042         trap_FX_PlayEffectID( cgs.effects.rocketExplosionEffect, origin, normal, -1, -1 );
00043 }

void FX_RocketHitWall vec3_t  origin,
vec3_t  normal
 

Definition at line 29 of file fx_rocketlauncher.c.

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

Referenced by CG_MissileHitWall().

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

void FX_RocketProjectileThink centity_t cent,
const struct weaponInfo_s weapon
 

Definition at line 11 of file fx_rocketlauncher.c.

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