From 437d0d07bb221b5f26e98f42205081fcc0da96e9 Mon Sep 17 00:00:00 2001 From: Bryce Hutchings Date: Fri, 21 Jun 2002 21:06:56 +0000 Subject: [PATCH] laserfog stuff --- reaction/cgame/cg_effects.c | 6 ++++++ reaction/cgame/cg_ents.c | 9 +++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/reaction/cgame/cg_effects.c b/reaction/cgame/cg_effects.c index 6c4d0f1f..047fae5f 100644 --- a/reaction/cgame/cg_effects.c +++ b/reaction/cgame/cg_effects.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.37 2002/06/21 21:06:56 niceass +// laserfog stuff +// // Revision 1.36 2002/06/21 04:11:34 niceass // fog laser // @@ -1179,6 +1182,9 @@ void CG_DrawVisibleLaser( vec3_t origin, int clientNum) { vec3_t destination, start, end; trace_t trace; + if ( !cg_enableLaserFog.integer ) + return; + for (num = 0; num < cg.snap->numEntities; num++) { cent = &cg_entities[cg.snap->entities[num].number]; if (cent->currentState.eType == ET_LASER && diff --git a/reaction/cgame/cg_ents.c b/reaction/cgame/cg_ents.c index 3b0b66f0..7672f059 100644 --- a/reaction/cgame/cg_ents.c +++ b/reaction/cgame/cg_ents.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.29 2002/06/21 21:06:20 niceass +// laserfog stuff +// // Revision 1.28 2002/06/21 04:11:17 niceass // fog laser // @@ -1104,9 +1107,11 @@ static void CG_LaserSight(centity_t * cent) ent.rotation = 0; 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) || - cent->currentState.clientNum == cg.clientNum) + cent->currentState.clientNum == cg.clientNum || + !cg_enableLaserFog.integer ) trap_R_AddRefEntityToScene(&ent); } else { trap_R_AddLightToScene(ent.origin, 200, 1, 1, 1);