Ejemplo n.º 1
0
/*
================
CG_AddMovingTracer
	- NiceAss
================
*/
void CG_AddTracer(localEntity_t * le)
{
	vec3_t start, end, dir;

	//BG_EvaluateTrajectory( &le->pos, cg.time, start );
	VectorMA(le->pos.trBase, (cg.time - le->pos.trTime) / 1000.0f, le->pos.trDelta, start);

	VectorNormalize2(le->pos.trDelta, dir);
	VectorMA(start, cg_tracerLength.value, dir, end);

	CG_Tracer(start, end);
}
Ejemplo n.º 2
0
/*
======================
CG_Bullet

Renders bullet effects.
======================
*/
void CG_Bullet( vec3_t end, int sourceEntityNum, vec3_t normal, qboolean flesh, int fleshEntityNum )
{
  vec3_t  start;

  // if the shooter is currently valid, calc a source point and possibly
  // do trail effects
  if( sourceEntityNum >= 0 && cg_tracerChance.value > 0 )
  {
    if( CG_CalcMuzzlePoint( sourceEntityNum, start ) )
    {
      // draw a tracer
      if( random( ) < cg_tracerChance.value )
        CG_Tracer( start, end );
    }
  }

  // impact splash and mark
  if( flesh )
    CG_Bleed( end, normal, fleshEntityNum );
  else
    CG_MissileHitWall( WP_MACHINEGUN, WPM_PRIMARY, 0, end, normal, IMPACTSOUND_DEFAULT );
}