mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-27 14:32:15 +00:00
tracer fix
This commit is contained in:
parent
4665cefb92
commit
fb025d630d
1 changed files with 9 additions and 7 deletions
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.77 2002/06/05 09:40:10 niceass
|
||||||
|
// tracer fix
|
||||||
|
//
|
||||||
// Revision 1.76 2002/06/03 01:09:33 niceass
|
// Revision 1.76 2002/06/03 01:09:33 niceass
|
||||||
// silencer scale changes
|
// silencer scale changes
|
||||||
//
|
//
|
||||||
|
@ -3798,7 +3801,7 @@ CG_CreateTracer
|
||||||
void CG_CreateTracer( int entity, vec3_t start, vec3_t end ) {
|
void CG_CreateTracer( int entity, vec3_t start, vec3_t end ) {
|
||||||
localEntity_t *le;
|
localEntity_t *le;
|
||||||
float dist;
|
float dist;
|
||||||
vec3_t dir;
|
vec3_t dir, end2;
|
||||||
vec3_t temp, midpoint;
|
vec3_t temp, midpoint;
|
||||||
float tracerSpeed = 4200;
|
float tracerSpeed = 4200;
|
||||||
|
|
||||||
|
@ -3809,9 +3812,9 @@ void CG_CreateTracer( int entity, vec3_t start, vec3_t end ) {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Stop right before the end
|
// Stop right before the end
|
||||||
VectorMA( end, -cg_tracerLength.value, dir, end );
|
VectorMA( end, -cg_tracerLength.value, dir, end2 );
|
||||||
|
|
||||||
VectorSubtract( end, start, temp );
|
VectorSubtract( end2, start, temp );
|
||||||
dist = VectorLength( temp );
|
dist = VectorLength( temp );
|
||||||
|
|
||||||
le = CG_AllocLocalEntity();
|
le = CG_AllocLocalEntity();
|
||||||
|
@ -3824,9 +3827,9 @@ void CG_CreateTracer( int entity, vec3_t start, vec3_t end ) {
|
||||||
VectorCopy( start, le->pos.trBase );
|
VectorCopy( start, le->pos.trBase );
|
||||||
VectorScale( dir, tracerSpeed, le->pos.trDelta );
|
VectorScale( dir, tracerSpeed, le->pos.trDelta );
|
||||||
|
|
||||||
midpoint[0] = ( start[0] + end[0] ) * 0.5;
|
midpoint[0] = ( start[0] + end2[0] ) * 0.5;
|
||||||
midpoint[1] = ( start[1] + end[1] ) * 0.5;
|
midpoint[1] = ( start[1] + end2[1] ) * 0.5;
|
||||||
midpoint[2] = ( start[2] + end[2] ) * 0.5;
|
midpoint[2] = ( start[2] + end2[2] ) * 0.5;
|
||||||
trap_S_StartSound( midpoint, ENTITYNUM_WORLD, CHAN_AUTO, cgs.media.tracerSound );
|
trap_S_StartSound( midpoint, ENTITYNUM_WORLD, CHAN_AUTO, cgs.media.tracerSound );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3950,7 +3953,6 @@ void CG_Bullet( vec3_t end, int sourceEntityNum, vec3_t normal,
|
||||||
|
|
||||||
// draw a tracer
|
// draw a tracer
|
||||||
// Elder: only if not using SSG, check if this client is the source
|
// Elder: only if not using SSG, check if this client is the source
|
||||||
|
|
||||||
if (sourceEntityNum == cg.snap->ps.clientNum)
|
if (sourceEntityNum == cg.snap->ps.clientNum)
|
||||||
{
|
{
|
||||||
if (cg.snap->ps.weapon != WP_SSG3000 &&
|
if (cg.snap->ps.weapon != WP_SSG3000 &&
|
||||||
|
|
Loading…
Reference in a new issue