codemp/cgame/fx_disruptor.c File Reference

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

Go to the source code of this file.

Defines

#define FX_ALPHA_WAVE   0x00000008

Functions

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)


Define Documentation

#define FX_ALPHA_WAVE   0x00000008
 

Definition at line 68 of file fx_disruptor.c.

Referenced by FX_DisruptorAltMiss().


Function Documentation

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 }