summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZack Middleton <zturtleman@gmail.com>2013-06-11 15:47:00 -0500
committerTim Angus <tim@ngus.net>2014-06-17 17:43:32 +0100
commitd86e37ffe4011a77eacb38eb58e597afe151792e (patch)
treec588bd5085c289a798a82f5ca5d0ffd7c5a2a829
parentfd7072f74ce183c840dd65d8983dfa159374c7c0 (diff)
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.
-rw-r--r--src/renderergl1/tr_flares.c4
-rw-r--r--src/renderergl2/tr_flares.c4
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]);