From d86e37ffe4011a77eacb38eb58e597afe151792e Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Tue, 11 Jun 2013 15:47:00 -0500 Subject: Don't try to fog flares with fogNum 0 fogNum 0 means no fog. Shaders don't try to apply fog color if fogNum is 0. This was done to make things more consistent and fix a crash in iortcw MP using a user made map on GNU/Linux x86_64. --- src/renderergl1/tr_flares.c | 4 ++-- src/renderergl2/tr_flares.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/renderergl1/tr_flares.c b/src/renderergl1/tr_flares.c index 310f501a..579bdf9c 100644 --- a/src/renderergl1/tr_flares.c +++ b/src/renderergl1/tr_flares.c @@ -353,8 +353,8 @@ void RB_RenderFlare( flare_t *f ) { VectorScale(f->color, f->drawIntensity * intensity, color); -// Calculations for fogging - if(tr.world && f->fogNum < tr.world->numfogs) + // Calculations for fogging + if(tr.world && f->fogNum > 0 && f->fogNum < tr.world->numfogs) { tess.numVertexes = 1; VectorCopy(f->origin, tess.xyz[0]); diff --git a/src/renderergl2/tr_flares.c b/src/renderergl2/tr_flares.c index 1c55bf10..f097c51e 100644 --- a/src/renderergl2/tr_flares.c +++ b/src/renderergl2/tr_flares.c @@ -353,8 +353,8 @@ void RB_RenderFlare( flare_t *f ) { VectorScale(f->color, f->drawIntensity * intensity, color); -// Calculations for fogging - if(tr.world && f->fogNum < tr.world->numfogs) + // Calculations for fogging + if(tr.world && f->fogNum > 0 && f->fogNum < tr.world->numfogs) { tess.numVertexes = 1; VectorCopy(f->origin, tess.xyz[0]); -- cgit