codemp/cgame/fx_bryarpistol.c File Reference

#include "cg_local.h"
#include "fx_local.h"

Go to the source code of this file.

Functions

void FX_BryarProjectileThink (centity_t *cent, const struct weaponInfo_s *weapon)
void FX_BryarHitWall (vec3_t origin, vec3_t normal)
void FX_BryarHitPlayer (vec3_t origin, vec3_t normal, qboolean humanoid)
void FX_BryarAltProjectileThink (centity_t *cent, const struct weaponInfo_s *weapon)
void FX_BryarAltHitWall (vec3_t origin, vec3_t normal, int power)
void FX_BryarAltHitPlayer (vec3_t origin, vec3_t normal, qboolean humanoid)
void FX_TurretProjectileThink (centity_t *cent, const struct weaponInfo_s *weapon)
void FX_TurretHitWall (vec3_t origin, vec3_t normal)
void FX_TurretHitPlayer (vec3_t origin, vec3_t normal, qboolean humanoid)
void FX_ConcussionHitWall (vec3_t origin, vec3_t normal)
void FX_ConcussionHitPlayer (vec3_t origin, vec3_t normal, qboolean humanoid)
void FX_ConcussionProjectileThink (centity_t *cent, const struct weaponInfo_s *weapon)
void FX_ConcAltShot (vec3_t start, vec3_t end)


Function Documentation

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_ConcAltShot vec3_t  start,
vec3_t  end
 

Definition at line 222 of file fx_bryarpistol.c.

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

Referenced by CG_EntityEvent().

00223 {
00224         //"concussion/beam"
00225         trap_FX_AddLine( start, end, 0.1f, 10.0f, 0.0f, 
00226                                                         1.0f, 0.0f, 0.0f,
00227                                                         WHITE, WHITE, 0.0f,
00228                                                         175, trap_R_RegisterShader( "gfx/effects/blueLine" ), 
00229                                                         FX_SIZE_LINEAR | FX_ALPHA_LINEAR );
00230 
00231         // add some beef
00232         trap_FX_AddLine( start, end, 0.1f, 7.0f, 0.0f, 
00233                                                 1.0f, 0.0f, 0.0f,
00234                                                 BRIGHT, BRIGHT, 0.0f,
00235                                                 150, trap_R_RegisterShader( "gfx/misc/whiteline2" ), 
00236                                                 FX_SIZE_LINEAR | FX_ALPHA_LINEAR );
00237 }

void FX_ConcussionHitPlayer vec3_t  origin,
vec3_t  normal,
qboolean  humanoid
 

Definition at line 192 of file fx_bryarpistol.c.

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

Referenced by CG_MissileHitPlayer().

00193 {
00194         trap_FX_PlayEffectID( cgs.effects.concussionImpactEffect, origin, normal, -1, -1 );
00195 }

void FX_ConcussionHitWall vec3_t  origin,
vec3_t  normal
 

Definition at line 182 of file fx_bryarpistol.c.

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

Referenced by CG_MissileHitWall().

00183 {
00184         trap_FX_PlayEffectID( cgs.effects.concussionImpactEffect, origin, normal, -1, -1 );
00185 }

void FX_ConcussionProjectileThink centity_t cent,
const struct weaponInfo_s weapon
 

Definition at line 202 of file fx_bryarpistol.c.

References centity_t, cgs, cgEffects_t::concussionShotEffect, 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().

00203 {
00204         vec3_t forward;
00205 
00206         if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f )
00207         {
00208                 forward[2] = 1.0f;
00209         }
00210 
00211         trap_FX_PlayEffectID( cgs.effects.concussionShotEffect, cent->lerpOrigin, forward, -1, -1 );
00212 }

void FX_TurretHitPlayer vec3_t  origin,
vec3_t  normal,
qboolean  humanoid
 

Definition at line 162 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().

00163 {
00164         if ( humanoid )
00165         {
00166                 trap_FX_PlayEffectID( cgs.effects.bryarFleshImpactEffect, origin, normal, -1, -1 );
00167         }
00168         else
00169         {
00170                 trap_FX_PlayEffectID( cgs.effects.bryarDroidImpactEffect, origin, normal, -1, -1 );
00171         }
00172 }

void FX_TurretHitWall vec3_t  origin,
vec3_t  normal
 

Definition at line 152 of file fx_bryarpistol.c.

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

Referenced by CG_MissileHitWall().

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

void FX_TurretProjectileThink centity_t cent,
const struct weaponInfo_s weapon
 

Definition at line 135 of file fx_bryarpistol.c.

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

Referenced by CG_RegisterWeapon().

00136 {
00137         vec3_t forward;
00138 
00139         if ( VectorNormalize2( cent->currentState.pos.trDelta, forward ) == 0.0f )
00140         {
00141                 forward[2] = 1.0f;
00142         }
00143 
00144         trap_FX_PlayEffectID( cgs.effects.turretShotEffect, cent->lerpOrigin, forward, -1, -1 );
00145 }