- this should have been in the last commit.

This commit is contained in:
Christoph Oelckers 2017-01-28 21:49:52 +01:00
parent 95afc97d48
commit 4f5d5d5de7

View file

@ -304,6 +304,11 @@ float gl_GetFogDensity(int lightlevel, PalEntry fogcolor, int sectorfogdensity)
// uses approximations of Legacy's default settings.
density = fogdensity ? fogdensity : 18;
}
else if (sectorfogdensity != 0)
{
// case 2: Sector has an explicit fog density set.
density = sectorfogdensity;
}
else if ((fogcolor.d & 0xffffff) == 0)
{
// case 1: black fog
@ -316,11 +321,6 @@ float gl_GetFogDensity(int lightlevel, PalEntry fogcolor, int sectorfogdensity)
density = 0;
}
}
else if (sectorfogdensity != 0)
{
// case 2: Sector has an explicit fog density set.
density = sectorfogdensity;
}
else if (outsidefogdensity != 0 && outsidefogcolor.a != 0xff && (fogcolor.d & 0xffffff) == (outsidefogcolor.d & 0xffffff))
{
// case 3. outsidefogdensity has already been set as needed