laserfog stuff

This commit is contained in:
Bryce Hutchings 2002-06-21 21:06:56 +00:00
parent 335816961c
commit 437d0d07bb
2 changed files with 13 additions and 2 deletions

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.37 2002/06/21 21:06:56 niceass
// laserfog stuff
//
// Revision 1.36 2002/06/21 04:11:34 niceass // Revision 1.36 2002/06/21 04:11:34 niceass
// fog laser // fog laser
// //
@ -1179,6 +1182,9 @@ void CG_DrawVisibleLaser( vec3_t origin, int clientNum) {
vec3_t destination, start, end; vec3_t destination, start, end;
trace_t trace; trace_t trace;
if ( !cg_enableLaserFog.integer )
return;
for (num = 0; num < cg.snap->numEntities; num++) { for (num = 0; num < cg.snap->numEntities; num++) {
cent = &cg_entities[cg.snap->entities[num].number]; cent = &cg_entities[cg.snap->entities[num].number];
if (cent->currentState.eType == ET_LASER && if (cent->currentState.eType == ET_LASER &&

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.29 2002/06/21 21:06:20 niceass
// laserfog stuff
//
// Revision 1.28 2002/06/21 04:11:17 niceass // Revision 1.28 2002/06/21 04:11:17 niceass
// fog laser // fog laser
// //
@ -1104,9 +1107,11 @@ static void CG_LaserSight(centity_t * cent)
ent.rotation = 0; ent.rotation = 0;
ent.customShader = cgs.media.laserShader; ent.customShader = cgs.media.laserShader;
// NiceAss: If the dot is in the fog, don't draw it unless it's your laser. // NiceAss: If the dot is in the fog, don't draw it unless it's your laser or
// fog lasers are disabled.
if ( !(trap_CM_PointContents(cent->lerpOrigin, 0) & CONTENTS_FOG) || if ( !(trap_CM_PointContents(cent->lerpOrigin, 0) & CONTENTS_FOG) ||
cent->currentState.clientNum == cg.clientNum) cent->currentState.clientNum == cg.clientNum ||
!cg_enableLaserFog.integer )
trap_R_AddRefEntityToScene(&ent); trap_R_AddRefEntityToScene(&ent);
} else { } else {
trap_R_AddLightToScene(ent.origin, 200, 1, 1, 1); trap_R_AddLightToScene(ent.origin, 200, 1, 1, 1);