- clamp MAPINFO provided fog density values to a valid range because negative values can trigger undefined shader behavior.

This commit is contained in:
Christoph Oelckers 2017-01-30 22:23:36 +01:00
parent 7c5e3fb677
commit 0e5aee48aa

View file

@ -413,7 +413,7 @@ void InitGLRMapinfoData()
if (opt != NULL)
{
gl_SetFogParams(opt->fogdensity, level.info->outsidefog, opt->outsidefogdensity, opt->skyfog);
gl_SetFogParams(clamp(opt->fogdensity, 0, 255), level.info->outsidefog, clamp(opt->outsidefogdensity, 0, 255), opt->skyfog);
glset.map_lightmode = opt->lightmode;
glset.map_lightadditivesurfaces = opt->lightadditivesurfaces;
glset.map_attenuate = opt->attenuate;