From baa775b31c59cdc8a3216a0e366706febc3032ec Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 24 Apr 2015 16:55:31 +0200 Subject: [PATCH] - fixed: Light level must be clamped before accessing the distfogtable. --- src/gl/renderer/gl_lightdata.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gl/renderer/gl_lightdata.cpp b/src/gl/renderer/gl_lightdata.cpp index 771c4c65ca..1e5922d0a8 100644 --- a/src/gl/renderer/gl_lightdata.cpp +++ b/src/gl/renderer/gl_lightdata.cpp @@ -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 {