Removed unused files, renamed some files

This commit is contained in:
Walter Julius Hennecke 2011-12-05 09:29:58 +01:00
parent 428e4d1c0b
commit ff55f1a1ab
6 changed files with 2 additions and 847 deletions

View file

@ -28,17 +28,14 @@ OBJ = \
fx_transporter.o \
fx_tetrion.o \
fx_stasis.o \
fx_scavenger.o \
fx_hypospray.o \
fx_quantum.o \
fx_phaser.o \
fx_misc.o \
fx_lib.o \
fx_item.o \
fx_imod.o \
fx_grenade.o \
fx_dreadnought.o \
fx_compression.o \
fx_borg.o \
cg_weapons.o \
cg_view.o \
cg_snapshot.o \
@ -98,17 +95,14 @@ cg_servercmds.o : cg_servercmds.c; $(DO_CC)
cg_snapshot.o : cg_snapshot.c; $(DO_CC)
cg_view.o : cg_view.c; $(DO_CC)
cg_weapons.o : cg_weapons.c; $(DO_CC)
fx_borg.o : fx_borg.c; $(DO_CC)
fx_compression.o : fx_compression.c; $(DO_CC)
fx_dreadnought.o : fx_dreadnought.c; $(DO_CC)
fx_grenade.o : fx_grenade.c; $(DO_CC)
fx_imod.o : fx_imod.c; $(DO_CC)
fx_item.o : fx_item.c; $(DO_CC)
fx_lib.o : fx_lib.c; $(DO_CC)
fx_misc.o : fx_misc.c; $(DO_CC)
fx_phaser.o : fx_phaser.c; $(DO_CC)
fx_quantum.o : fx_quantum.c; $(DO_CC)
fx_scavenger.o : fx_scavenger.c; $(DO_CC)
fx_hypospray.o : fx_scavenger.c; $(DO_CC)
fx_stasis.o : fx_stasis.c; $(DO_CC)
fx_tetrion.o : fx_tetrion.c; $(DO_CC)
fx_transporter.o : fx_transporter.c; $(DO_CC)

View file

@ -1,214 +0,0 @@
#include "cg_local.h"
#include "fx_local.h"
#define BORG_SPIN 0.6f
//------------------------------------------------------------------------------
/*void FX_BorgProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon )
{
float len;
vec3_t dir, end;
FX_AddSprite( cent->lerpOrigin, NULL, qfalse,
8.0f + ( random() * 24.0f ), 0.0f,
1.0f, 1.0f,
random() * 360, 0.0f,
1,
cgs.media.borgFlareShader);
// Energy glow
FX_AddSprite( cent->lerpOrigin, NULL, qfalse,
18.0f + ( random() * 24.0f ), 0.0f,
0.2f, 0.1f,
random() * 360, 0.0f,
1,
cgs.media.borgFlareShader);
VectorSet( dir, crandom(), crandom(), crandom() );
VectorNormalize( dir );
len = random() * 12.0f + 18.0f;
VectorMA( cent->lerpOrigin, len, dir, end );
FX_AddElectricity( cent->lerpOrigin, end, 0.2f, 0.6f, 0.0f, 0.3f, 0.0f, 5, cgs.media.borgLightningShaders[2], 1.0f );
}*/
/*
-------------------------
FX_BorgWeaponHitWall
-------------------------
*/ /*
void FX_BorgWeaponHitWall( vec3_t origin, vec3_t normal )
{
weaponInfo_t *weaponInfo = &cg_weapons[WP_MEDKIT];
// Expanding shock ring
FX_AddQuad( origin, normal,
0.5f, 6.4f,
0.8, 0.0,
random() * 360.0f,
200,
cgs.media.borgLightningShaders[0] );
// Impact core
FX_AddQuad( origin, normal,
16.0f + ( random() * 8.0f ), 3.2f,
0.6f, 0.0f,
cg.time * BORG_SPIN,
100,
cgs.media.borgLightningShaders[0] );
//Sound
trap_S_StartSound( origin, ENTITYNUM_WORLD, CHAN_AUTO, weaponInfo->mainHitSound);
CG_ImpactMark( cgs.media.scavMarkShader, origin, normal, random()*360, 1,1,1,0.2, qfalse, random() + 5.5f, qfalse );
} */
/*
-------------------------
FX_BorgTaser
-------------------------
*/
/*
void FX_BorgTaser( vec3_t end, vec3_t start )
{
float len;
vec3_t dis;
FX_AddSprite( end, NULL, qfalse, 9.0f, 0.0f, 1.0f, 0.0f, 30.0f, 0.0f, 250, cgs.media.borgLightningShaders[0] );
FX_AddSprite( end, NULL, qfalse, 18.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 150, cgs.media.borgLightningShaders[0] );
FX_AddSprite( start, NULL, qfalse, 12.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 100, cgs.media.borgLightningShaders[0] );
FX_AddSprite( start, NULL, qfalse, 6.0f, 0.0f, 1.0f, 0.0f, 60.0f, 0.0f, 150, cgs.media.borgLightningShaders[0] );
VectorSubtract( start, end, dis );
len = VectorNormalize( dis );
if ( len < 96 )
len = 0.6f;
else if ( len < 256 )
len = 0.4f;
else if ( len > 512 )
len = 0.1f;
else
len = 0.2f;
FX_AddLine( start, end, 1.0f, 5.0f, 0.0f, 1.0f, 0.0f, 150, cgs.media.borgLightningShaders[1] );
FX_AddElectricity( start, end, 0.2f, 3.0f, 0.0f, 1.0f, 0.0f, 150, cgs.media.borgLightningShaders[2], len );
FX_AddElectricity( start, end, 0.5f, 2.0f, 0.0f, 1.0f, 0.0f, 150, cgs.media.borgLightningShaders[3], len );
}*/
//------------------------------------------------
// unused!
/*void FX_BorgEyeBeam( vec3_t start, vec3_t end, vec3_t normal, qboolean large )
{
float width, alpha;
vec3_t rgb = {1.0f,0.0f,0.0f};
width = 0.5f + ( crandom() * 0.1 );
if ( large )
width *= 3.5;
alpha = 0.4f + ( random() * 0.25 );
FX_AddLine2( start, end, 1.0f,
width, 0.0f, width, 0.0f,
alpha, alpha,
rgb, rgb,
1.0f,
cgs.media.whiteLaserShader );
FX_AddSprite( start, NULL, qfalse,
1.0f + (random() * 2.0f), 0.0f,
0.6f, 0.6f,
0.0f, 0.0f, 1.0f,
cgs.media.borgEyeFlareShader );
FX_AddQuad( end, normal,
2.0f + (crandom() * 1.0f), 0.0f,
1.0f, 1.0f,
0.0f, 1.0f,
cgs.media.borgEyeFlareShader );
}*/
#define BORG_PARTICLE_RADIUS 32
//------------------------------------------------------------------------------------
void FX_BorgTeleportParticles( vec3_t origin, vec3_t dir )
{
int i;
vec3_t neworg, vel;
for ( i = 0; i < 26; i++ )
{
VectorSet( neworg,
origin[0] + ( crandom() * ( BORG_PARTICLE_RADIUS * 0.5 ) ),
origin[1] + ( crandom() * ( BORG_PARTICLE_RADIUS * 0.5 ) ),
origin[2] + ( crandom() * 4.0f ) );
VectorScale( dir, 32 + ( random() * 96 ), vel );
FX_AddSprite( neworg, vel, qfalse, 1.0f + ( crandom() * 2.0f ), 0.0f, 1.0f, 0.0f, random() * 360, 0.0f, 1700, cgs.media.borgFlareShader );
}
}
//-------------------------------------
// unused
/*
void FX_BorgTeleport( vec3_t origin )
{
vec3_t org, org2, angles, dir;
localEntity_t *le;
VectorSet( angles, 0, 0, 1 );
VectorSet( org, origin[0], origin[1], origin[2] - 32 );
FX_BorgTeleportParticles( origin, angles );
VectorSet( angles, 0, 0, -1 );
VectorSet( org2, origin[0], origin[1], origin[2] + 32 );
FX_BorgTeleportParticles( origin, angles );
VectorSubtract( org2, org, dir );
VectorNormalize( dir );
le = FX_AddCylinder( org, dir, 96.0f, 0.0f, 1.0f, 48.0f, 1.0f, 48.0f, 1.0f, 0.0f, 1500, cgs.media.borgFlareShader, 0.5 );
le->refEntity.data.cylinder.wrap = qtrue;
le->refEntity.data.cylinder.stscale = 24;
trap_S_StartSound( origin, ENTITYNUM_WORLD, CHAN_AUTO, cgs.media.borgBeamInSound );
}*/
//-------------------------------------
//unused
/*
void FX_BorgTeleportTrails( vec3_t origin )
{
int i;
float scale;
vec3_t org, ang, angvect;
for ( i = 0; i < 2; i++ )
{
// position on the sphere
if ( i == 0 )
{
ang[ROLL] = 0;
ang[PITCH] = sin( cg.time * 0.002f ) * 360;
ang[YAW] = cg.time * 0.04f;
}
else
{
ang[ROLL] = 0;
ang[PITCH] = sin( cg.time * 0.002f + 3.14159f ) * 360;
ang[YAW] = cg.time * 0.04f + 180.0f;
}
AngleVectors( ang, angvect, NULL, NULL);
// Set the particle position
org[0] = 12 * angvect[0] + origin[0];
org[1] = 12 * angvect[1] + origin[1];
org[2] = 32 * angvect[2] + origin[2];
scale = random() * 4.0f + 4.0f;
FX_AddSprite( org, NULL, qtrue, scale, -scale, 1.0f, 1.0f, 0.0f, 0.0f, 200.0f + random() * 200.0f, cgs.media.borgFlareShader );
}
}*/

View file

@ -1,310 +0,0 @@
#include "cg_local.h"
#include "fx_local.h"
/*
-------------------------
FX_DreadnoughtHitWall
-------------------------
*/
/*void FX_DreadnoughtHitWall( vec3_t origin, vec3_t normal, qboolean spark )
{
float scale = 1.0f + ( random() * 1.0f );
int num, i;
localEntity_t *le = NULL;
vec3_t vel;
// weaponInfo_t *weaponInfo = &cg_weapons[WP_DERMAL_REGEN];
// trap_S_StartSound(origin, ENTITYNUM_WORLD, CHAN_AUTO, weaponInfo->altHitSound);
le = FX_AddQuad( origin, normal, 32.0 + random() * 48, 0, 0.5, 0.5, 0, 100, cgs.media.purpleParticleShader );
if (le)
{
le->leFlags |= LEF_ONE_FRAME;
}
le = FX_AddQuad( origin, normal, 24.0 + random() * 32, 0, 0.6, 0.6, 0, 100, cgs.media.ltblueParticleShader );
if (le)
{
le->leFlags |= LEF_ONE_FRAME;
}
CG_ImpactMark( cgs.media.scavMarkShader, origin, normal, random()*360, 1,1,1,0.2, qfalse,
random() * 4 + 8, qfalse );
if ( spark )
{
trap_R_AddLightToScene( origin, 75 + (rand()&31), 1.0, 0.8, 1.0 );
// Drop some sparks
num = (int)(random() * 2) + 2;
for ( i = 0; i < num; i++ )
{
scale = 0.6f + random();
if ( rand() & 1 )
FXE_Spray( normal, 70, 80, 0.9f, vel);
else
FXE_Spray( normal, 80, 200, 0.5f, vel);
FX_AddTrail( origin, vel, qfalse, 8.0f + random() * 8, -48.0f,
scale, -scale, 1.0f, 0.8f, 0.4f, 600.0f, cgs.media.spark2Shader );
}
}
}*/
/*
-------------------------
FX_DreadnoughtFire
-------------------------
*/
/*void FX_DreadnoughtFire( vec3_t origin, vec3_t end, vec3_t normal, qboolean spark, qboolean impact )
{
// localEntity_t *le = NULL;
float scale = 1.0f + ( random() * 1.0f );
refEntity_t beam;
// Draw beams first.
memset( &beam, 0, sizeof( beam ) );
VectorCopy( origin, beam.origin);
VectorCopy( end, beam.oldorigin );
beam.reType = RT_LINE;
beam.customShader = cgs.media.dnBoltShader;
AxisClear( beam.axis );
beam.shaderRGBA[0] = 0xff*0.2;
beam.shaderRGBA[1] = 0xff*0.2;
beam.shaderRGBA[2] = 0xff*0.2;
beam.shaderRGBA[3] = 0xff;
beam.data.line.stscale = 2.0;
beam.data.line.width = scale*6;
trap_R_AddRefEntityToScene( &beam );
// Add second core beam
memset( &beam, 0, sizeof( beam ) );
VectorCopy( origin, beam.origin);
VectorCopy( end, beam.oldorigin );
beam.reType = RT_LINE;
beam.customShader = cgs.media.dnBoltShader;
AxisClear( beam.axis );
beam.shaderRGBA[0] = 0xff*0.8;
beam.shaderRGBA[1] = 0xff*0.8;
beam.shaderRGBA[2] = 0xff*0.8;
beam.shaderRGBA[3] = 0xff;
beam.data.line.stscale = 1.0;
beam.data.line.width = scale*4.5;
trap_R_AddRefEntityToScene( &beam );
if (spark)
{
// Add first electrical bolt
memset( &beam, 0, sizeof( beam ) );
VectorCopy( origin, beam.origin);
VectorCopy( end, beam.oldorigin );
beam.reType = RT_ELECTRICITY;
beam.customShader = cgs.media.dnBoltShader;
AxisClear( beam.axis );
beam.shaderRGBA[0] = 0xff*0.8;
beam.shaderRGBA[1] = 0xff*0.8;
beam.shaderRGBA[2] = 0xff*0.8;
beam.shaderRGBA[3] = 0xff;
beam.data.electricity.stscale = 1.0;
beam.data.electricity.width = scale*0.5;
beam.data.electricity.deviation = 0.2;
trap_R_AddRefEntityToScene( &beam );
}
// Add next electrical bolt
memset( &beam, 0, sizeof( beam ) );
VectorCopy( origin, beam.origin);
VectorCopy( end, beam.oldorigin );
beam.reType = RT_ELECTRICITY;
beam.customShader = cgs.media.dnBoltShader;
AxisClear( beam.axis );
beam.shaderRGBA[0] = 0xff*0.8;
beam.shaderRGBA[1] = 0xff*0.8;
beam.shaderRGBA[2] = 0xff*0.8;
beam.shaderRGBA[3] = 0xff;
beam.data.electricity.stscale = 1.0;
beam.data.electricity.width = scale*0.75;
beam.data.electricity.deviation = 0.12;
trap_R_AddRefEntityToScene( &beam );
le = FX_AddLine( origin, end, 2.0f, scale * 6, 0.0f, 0.2f, 0.2f, 100, cgs.media.dnBoltShader );
if (le)
{
le->leFlags |= LEF_ONE_FRAME;
}
le = FX_AddLine( origin, end, 1.0f, scale * 4.5, 0.0f, 0.8f, 0.8f, 100, cgs.media.dnBoltShader );
if (le)
{
le->leFlags |= LEF_ONE_FRAME;
}
if ( spark )
{
le = FX_AddElectricity( origin, end, 1.0f, scale * 0.5, 0, 0.8, 0.8, 100, cgs.media.dnBoltShader, 0.2 );
if (le)
{
le->leFlags |= LEF_ONE_FRAME;
}
}
le = FX_AddElectricity( origin, end, 1.0f, scale * 0.75, 0, 0.8, 0.8, 100, cgs.media.dnBoltShader, 0.12 );
if (le)
{
le->leFlags |= LEF_ONE_FRAME;
}
// Add a subtle screen shake
CG_ExplosionEffects( origin, 1.0f, 15 );
if (impact)
{
FX_DreadnoughtHitWall( end, normal, spark );
}
}*/
/*
-------------------------
FX_DreadnoughtProjectileThink
Freaky random lightning burst
-------------------------
*/
/*#define FX_DN_ALT_THINK_TIME 100
void FX_DreadnoughtProjectileThink( centity_t *cent, const struct weaponInfo_s *weapon )
{
// refEntity_t beam;
float scale;
scale = flrandom(10.0, 15.0);
// If this is a new thinking time, draw some starting stuff...
if (cent->miscTime < cg.time)
{
trace_t trace;
vec3_t fwd, right, boltdir, boltend, mins={-2,-2,-2}, maxs={2,2,2};
float len;
localEntity_t *le;
int playSound = 1;//(irandom(0,1) == 0)?1:0;
cent->miscTime = cg.time + FX_DN_ALT_THINK_TIME;
VectorSubtract(cent->currentState.origin, cent->currentState.origin2, fwd);
// Throw a sprite from the start to the end over the next
VectorScale(fwd, 1000.0*(1.0/FX_DN_ALT_THINK_TIME), boltdir);
le = FX_AddSprite(cent->currentState.origin2, boltdir, qfalse, scale*8, -scale*2, 1.0, 1.0, 0, 0, FX_DN_ALT_THINK_TIME, cgs.media.blueParticleShader);
le->light = 200;
le->refEntity.renderfx |= RF_NOSHADOW;
VectorSet( le->lightColor, 0.5f, 0.8f, 1.0f );
len = VectorNormalize(fwd);
// Illegal if org and org2 are the same.
if (len<=0)
return;
// Draw a bolt from the old position to the new.
FX_AddLine( cent->currentState.origin2, cent->currentState.origin, 1.0, scale*4, -scale*4, 0.75, 0.0, FX_DN_ALT_THINK_TIME*2, cgs.media.dnBoltShader);
// ALSO draw an electricity bolt from the old position to the new.
FX_AddElectricity( cent->currentState.origin2, cent->currentState.origin, 0.2f, scale, -scale, 1.0, 0.5, FX_DN_ALT_THINK_TIME*2, cgs.media.dnBoltShader, 0.5 );
// And a bright new sprite at the current locale.
FX_AddSprite(cent->currentState.origin, NULL, qfalse, scale*2, scale*4, 1.0, 1.0, 0, 0, FX_DN_ALT_THINK_TIME, cgs.media.blueParticleShader);
// Put a sprite in the old position, fading away.
FX_AddSprite(cent->currentState.origin2, NULL, qfalse, scale*5, -scale*5, 1.0, 1.0, 0, 0, FX_DN_ALT_THINK_TIME*2, cgs.media.blueParticleShader);
// Shoot rays out (roughly) to the sides to connect with walls or whatever...
// PerpendicularVector(right, fwd);
right[0] = fwd[1];
right[1] = -fwd[0];
right[2] = -fwd[2];
// Right vector
// The boltdir uses a random offset to the perp vector.
boltdir[0] = right[0] + flrandom(-0.25, 0.25);
boltdir[1] = right[1] + flrandom(-0.25, 0.25);
boltdir[2] = right[2] + flrandom(-1.0, 1.0);
// Shoot a vector off to the side and trace till we hit a wall.
VectorMA(cent->currentState.origin, 256, boltdir, boltend);
CG_Trace( &trace, cent->currentState.origin, mins, maxs, boltend, cent->currentState.number, MASK_SOLID );
if (trace.fraction < 1.0)
{
VectorCopy(trace.endpos, boltend);
FX_AddElectricity( cent->currentState.origin, boltend, 0.2f, scale, -scale, 1.0, 0.5, FX_DN_ALT_THINK_TIME*2, cgs.media.dnBoltShader, 0.5 );
// Put a sprite at the endpoint that stays.
FX_AddQuad(trace.endpos, trace.plane.normal, scale, -scale*0.5, 1.0, 0.5, 0.0, FX_DN_ALT_THINK_TIME*2, cgs.media.blueParticleShader);
if (playSound)
{
if (irandom(0,1))
{
weaponInfo_t *weaponInfo = &cg_weapons[WP_DERMAL_REGEN];
trap_S_StartSound(trace.endpos, ENTITYNUM_WORLD, CHAN_AUTO, weaponInfo->alt_missileSound);
playSound = 0;
}
}
}
// Left vector
// The boltdir uses a random offset to the perp vector.
boltdir[0] = -right[0] + flrandom(-0.25, 0.25);
boltdir[1] = -right[1] + flrandom(-0.25, 0.25);
boltdir[2] = -right[2] + flrandom(-1.0, 1.0);
// Shoot a vector off to the side and trace till we hit a wall.
VectorMA(cent->currentState.origin, 256, boltdir, boltend);
CG_Trace( &trace, cent->currentState.origin, mins, maxs, boltend, cent->currentState.number, MASK_SOLID );
if (trace.fraction < 1.0)
{
VectorCopy(trace.endpos, boltend);
FX_AddElectricity( cent->currentState.origin, boltend, 0.2f, scale, -scale, 1.0, 0.5, FX_DN_ALT_THINK_TIME*2, cgs.media.dnBoltShader, 0.5 );
// Put a sprite at the endpoint that stays.
FX_AddQuad(trace.endpos, trace.plane.normal, scale, -scale*0.5, 1.0, 0.5, 0.0, FX_DN_ALT_THINK_TIME*2, cgs.media.blueParticleShader);
if (playSound)
{
weaponInfo_t *weaponInfo = &cg_weapons[WP_DERMAL_REGEN];
trap_S_StartSound(trace.endpos, ENTITYNUM_WORLD, CHAN_AUTO, weaponInfo->alt_missileSound);
playSound = 0;
}
}
}
}*/
/*
-------------------------
FX_DreadnoughtShotMiss
Alt-fire, miss effect
-------------------------
*/
/*void FX_DreadnoughtShotMiss( vec3_t end, vec3_t dir )
{
vec3_t org;
weaponInfo_t *weaponInfo = &cg_weapons[WP_DERMAL_REGEN];
trap_S_StartSound(end, ENTITYNUM_WORLD, CHAN_AUTO, weaponInfo->altHitSound);
// Move me away from the wall a bit so that I don't z-buffer into it
VectorMA( end, 0.5, dir, org );
// Expanding rings
// FX_AddQuad( org, dir, 1, 24, 0.8, 0.2, random() * 360, 400, cgs.media.stasisRingShader );
// FX_AddQuad( org, dir, 1, 60, 0.8, 0.2, random() * 360, 300, cgs.media.stasisRingShader );
// Impact effect
FX_AddQuad( org, dir, 7, 35, 1.0, 0.0, random() * 360, 500, cgs.media.blueParticleShader );
FX_AddQuad( org, dir, 5, 25, 1.0, 0.0, random() * 360, 420, cgs.media.ltblueParticleShader );
CG_ImpactMark( cgs.media.scavMarkShader, org, dir, random()*360, 1,1,1,0.6, qfalse,
8 + random() * 2, qfalse );
FX_AddSprite( end, NULL, qfalse, flrandom(40,60), -50, 1.0, 0.0, random() * 360, 0, 500, cgs.media.blueParticleShader );
}*/

View file

@ -1,315 +0,0 @@
#include "cg_local.h"
#include "fx_local.h"
/*
-------------------------
FX_AltIMODBolt
-------------------------
*/
/*void FX_AltIMODBolt( vec3_t start, vec3_t end, vec3_t dir )
{
vec3_t control1, control2, control1_vel, control2_vel,
control1_acceleration, control2_acceleration;
vec3_t direction, vr, vu;
float len;
localEntity_t *le;
MakeNormalVectors( dir, vr, vu );
VectorSubtract( end, start, direction );
len = VectorNormalize( direction );
VectorMA(start, len*0.5f, direction, control1 );
VectorMA(start, len*0.25f, direction, control2 );
vectoangles( direction, control1_vel );
control1_vel[ROLL] += crandom() * 360;
AngleVectors( control1_vel, NULL, NULL, control1_vel );
vectoangles( direction, control2_vel );
control2_vel[ROLL] += crandom() * 360;
AngleVectors( control2_vel, NULL, NULL, control2_vel );
VectorScale(control1_vel, 12.0f + (140.0f * random()), control1_vel);
VectorScale(control2_vel, -12.0f + (-140.0f * random()), control2_vel);
VectorClear(control1_acceleration);
VectorClear(control2_acceleration);
le = FX_AddBezier( start, end,
control1, control2, control1_vel, control2_vel, control1_acceleration, control2_acceleration,
4.0f, //scale
1000.0f, //killtime
cgs.media.IMOD2Shader );
le->alpha = 0.8;
le->dalpha = -0.8;
}*/
/*
-------------------------
FX_IMODBolt2
-------------------------
*/
/*void FX_IMODBolt2( vec3_t start, vec3_t end, vec3_t dir )
{
vec3_t control1, control2, control1_velocity, control2_velocity,
control1_acceleration, control2_acceleration;
float length = 0;
vec3_t vTemp;
localEntity_t *le;
// initial position of control points
VectorSubtract(end, start, vTemp);
length = VectorNormalize(vTemp);
VectorMA(start, 0.5 * length, vTemp, control1);
VectorMA(start, 0.25 * length, vTemp, control2);
// initial velocity of control points
vectoangles(vTemp, control1_velocity);
control1_velocity[ROLL] += crandom() * 360;
AngleVectors(control1_velocity, NULL, NULL, control1_velocity);
vectoangles(vTemp, control2_velocity);
control2_velocity[ROLL] += crandom() * 360;
AngleVectors(control2_velocity, NULL, NULL, control2_velocity);
VectorScale(control1_velocity, 12.0f + (140.0f * random()), control1_velocity);
VectorScale(control2_velocity, -12.0f + (-140.0f * random()), control2_velocity);
// constant acceleration of control points
VectorScale(control1_velocity, -1.2, control1_acceleration);
for (i = 0; i < 3; i++)
{
control1_acceleration[i] += flrandom (-10, 10);
}
VectorScale(control2_velocity, -1.2, control2_acceleration);
for (i = 0; i < 3; i++)
{
control2_acceleration[i] += flrandom (-10, 10);
}
*/
// VectorClear(control1_acceleration);
// VectorClear(control2_acceleration);
//
// le = FX_AddBezier(start, end, control1, control2, control1_velocity, control2_velocity, control1_acceleration,
// control2_acceleration, 4, 600, cgs.media.altIMOD2Shader);
// le->alpha = 0.6;
// le->dalpha = -0.6;
//}*/
/*
-------------------------
FX_IMODShot
-------------------------
*/
//#define MAXRANGE_IMOD 8192
/*void FX_IMODShot( vec3_t end, vec3_t start, vec3_t dir)
{
vec3_t ofs, end2;
trace_t trace;
qboolean render_impact = qtrue;
VectorMA( end, 1, dir, ofs );
FX_AddLine(start, end, 1.0, 8.0, -8.0, 1.0, 0.0, 350, cgs.media.altIMODShader);
FX_IMODBolt2( start, end, dir);
// cover up the start point of the beam
FX_AddSprite( start, NULL, qfalse, irandom(8,12), -8, 1.0, 0.6, random()*360, 0.0, 400, cgs.media.purpleParticleShader);
// where do we put an explosion?
VectorMA(start, MAXRANGE_IMOD, cg.refdef.viewaxis[0], end2);
CG_Trace( &trace, start, NULL, NULL, end2, 0, MASK_SHOT );
if ( trace.surfaceFlags & SURF_NOIMPACT )
{
render_impact = qfalse;
}
if ( render_impact )
{
FX_IMODExplosion(end, trace.plane.normal);
}
}*/
/*
-------------------------
FX_AltIMODShot
-------------------------
*/
//unused
/*#define FX_ALT_IMOD_HOLD 200
#define FX_ALT_IMOD_FLASHSIZE 16
qboolean IMODAltAftereffect(localEntity_t *le)
{
localEntity_t *spr = NULL;
qhandle_t shader = cgs.media.blueParticleShader;
//only want an initial sprite
le->endTime = cg.time;
spr = FX_AddSprite( le->refEntity.origin,// origin
NULL, // velocity
qfalse, // gravity
FX_ALT_IMOD_FLASHSIZE, // scale
-10, // dscale
0.8, // startalpha
0.0, // endalpha
0.0, // roll
0.0, // elasticity
700, // killTime
shader); // shader
return qtrue;
}*/
/*void FX_AltIMODShot( vec3_t end, vec3_t start, vec3_t dir)
{
vec3_t ofs, end2;
int i = 0;
trace_t trace;
qboolean render_impact = qtrue;
VectorMA( end, 1, dir, ofs );
FX_AddLine( start, end, 1.0f, 32.0f, -32.0f, 1.0f, 1.0f, 500.0f, cgs.media.IMODShader);
for ( i = 0; i < 2; i++ )
FX_AltIMODBolt( start, end, dir );
// cover up the start point of the beam
FX_AddSprite( start, NULL, qfalse, FX_ALT_IMOD_FLASHSIZE, 0, 1.0, 0.6, 0.0, 0.0, FX_ALT_IMOD_HOLD, cgs.media.blueParticleShader);
FX_AddSpawner( start, dir, NULL, NULL, qfalse, FX_ALT_IMOD_HOLD,
0, FX_ALT_IMOD_HOLD+100, IMODAltAftereffect, 10 );
// where do we put an explosion?
VectorMA(start, MAXRANGE_IMOD, cg.refdef.viewaxis[0], end2);
CG_Trace( &trace, start, NULL, NULL, end2, 0, MASK_SHOT );
if ( trace.surfaceFlags & SURF_NOIMPACT )
{
render_impact = qfalse;
}
if ( render_impact )
{
FX_AltIMODExplosion(end, trace.plane.normal);
}
}*/
/*
-------------------------
FX_IMODExplosion
-------------------------
*/
/*void FX_IMODExplosion( vec3_t origin, vec3_t normal )
{
localEntity_t *le;
vec3_t direction, vel;
float scale, dscale;
int i, numSparks;
//Orient the explosions to face the camera
VectorSubtract( cg.refdef.vieworg, origin, direction );
VectorNormalize( direction );
//Tag the last one with a light
le = CG_MakeExplosion( origin, direction, cgs.media.explosionModel, cgs.media.imodExplosionShader, 400, qfalse);
le->light = 75;
VectorSet( le->lightColor, 1.0f, 0.8f, 0.5f );
//Sparks
numSparks = 3 + (rand() & 7);
// kef -- fixme. what does vel do?
VectorClear(vel);
for ( i = 0; i < numSparks; i++ )
{
scale = 1.0f + (random() * 0.5f);
dscale = -scale*0.5;
FX_AddTrail( origin,
NULL,
qfalse,
32.0f + (random() * 64.0f),
-256.0f,
scale,
0.0f,
1.0f,
0.0f,
0.25f,
750.0f,
cgs.media.purpleParticleShader );
//FXE_Spray( normal, 500, 250, 0.75f, 256,//vel );
//}
//CG_ImpactMark( cgs.media.IMODMarkShader, origin, normal, random()*360, 1,1,1,0.75, qfalse, 5, qfalse );
// CG_ImpactMark( cgs.media.scavMarkShader, origin, normal, random()*360, 1,1,1,0.2, qfalse, random() + 1, qfalse );
// CG_ExplosionEffects( origin, 1.0f, 150 );
//}*/
/*
-------------------------
FX_AltIMODExplosion
-------------------------
*/
/*void FX_AltIMODExplosion( vec3_t origin, vec3_t normal )
{
localEntity_t *le;
vec3_t direction, org, vel;
float scale, dscale;
int i, numSparks;
//Orient the explosions to face the camera
VectorSubtract( cg.refdef.vieworg, origin, direction );
VectorNormalize( direction );
//Tag the last one with a light
le = CG_MakeExplosion( origin, direction, cgs.media.explosionModel, cgs.media.electricalExplosionSlowShader, 475, qfalse);
le->light = 150;
VectorSet( le->lightColor, 1.0f, 0.8f, 0.5f );
for ( i = 0; i < 2; i ++)
{
VectorSet( org, origin[0] + 16 * random(), origin[1] + 16 * random(), origin[2] + 16 * random() );
CG_MakeExplosion( org, direction, cgs.media.explosionModel, cgs.media.electricalExplosionFastShader,
250, qfalse);
}
//Sparks
numSparks = 8 + (rand() & 7);
// kef -- fixme. what does this vector do!?! waaaaaah!
VectorClear(vel);
for ( i = 0; i < numSparks; i++ )
{
scale = 1.5f + (random() * 0.5f);
dscale = -scale*0.5;
FX_AddTrail( origin,
NULL,
qfalse,
32.0f + (random() * 64.0f),
-256.0f,
scale,
0.0f,
1.0f,
0.0f,
0.25f,
750.0f,
cgs.media.spark2Shader );
FXE_Spray( normal, 500, 250, 0.75f, 256, //vel );
//}
//CG_ImpactMark( cgs.media.IMODMarkShader, origin, normal, random()*360, 1,1,1,1, qfalse, 8, qfalse );
//CG_ExplosionEffects( origin, 2.0f, 250 );
//}*/

Binary file not shown.