x/1 != x?

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Smoke39

whatever
Jun 2, 2001
1,793
0
0
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.
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;
		}
	}
}
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?
 

Smoke39

whatever
Jun 2, 2001
1,793
0
0
No. It seemed irrelevant. I also forgot to mention that setting UserDensity to 0 seems to produce the expected effect of no fog.
Edit: Commented out the skyzone bit, same result (except that the skybox was unfoggy, of course). Grr.
 
Last edited: