- fixed: Light level must be clamped before accessing the distfogtable.

This commit is contained in:
Christoph Oelckers 2015-04-24 16:55:31 +02:00
parent 887014c322
commit baa775b31c

View file

@ -312,7 +312,7 @@ float gl_GetFogDensity(int lightlevel, PalEntry fogcolor)
// case 1: black fog
if (glset.lightmode != 8)
{
density=distfogtable[glset.lightmode!=0][lightlevel];
density=distfogtable[glset.lightmode!=0][gl_ClampLight(lightlevel)];
}
else
{