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.
This commit is contained in:
Zack Middleton 2013-06-11 15:47:00 -05:00
parent 7b15415042
commit 00c1831edb
2 changed files with 4 additions and 4 deletions

View File

@ -352,8 +352,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]);

View File

@ -352,8 +352,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]);