Skip to content

Commit

Permalink
Fog parameters are properly normalized at world spawn
Browse files Browse the repository at this point in the history
Bug occured on map bm_chrisholden
  • Loading branch information
j0zzz committed Dec 8, 2021
1 parent 932c0a2 commit 95e1400
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions trunk/gl_fog.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,10 @@ void Fog_ParseWorldspawn (void)
if (!strcmp("fog", key))
{
sscanf(value, "%f %f %f %f", &fog_density, &fog_red, &fog_green, &fog_blue);
fog_density = max(0.0, fog_density);
fog_red = bound(0.0, fog_red, 1.0);
fog_green = bound(0.0, fog_green, 1.0);
fog_blue = bound(0.0, fog_blue, 1.0);
}
}
}
Expand Down

0 comments on commit 95e1400

Please sign in to comment.