So I'm making this fog-match mutator, and I want the user to be able to provide a multiplier for the thickness of the fog. Everything's working, but when I try to modify the ZoneInfos and such, it acts as it the fog has been set to maximum thickness.
The result of dividing DistanceFogStart and DistanceFogEnd by UserDensity seems to be equivalent to setting both variables to 0. I've even tried replacing UserDensity with 1 and got the same results, so there's definitely something funky goin' on there. Anyone got any ideas?
Code:
foreach AllActors( class'ZoneInfo', ZI )
{
ZI.bDistanceFog = true;
ZI.bClearToFogColor = true;
ZI.DistanceFogColor = FogColor;
if ( ZI.IsA('skyzoneinfo') )
{
ZI.DistanceFogStart = 0;
ZI.DistanceFogEnd = 0;
}
else
{
if ( bRelativeDensity )
{
ZI.DistanceFogStart /= UserDensity;
ZI.DistanceFogEnd /= UserDensity;
}
else
{
ZI.DistanceFogStart = UserStart;
ZI.DistanceFogEnd = UserEnd;
}
}
}