PDA

View Full Version : x/1 != x?


Smoke39
20th Jan 2004, 01:59 AM
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.

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?

SamMaster
20th Jan 2004, 01:45 PM
did you try out changing the "if (skyzoneinfo)" value portion?

Smoke39
20th Jan 2004, 06:36 PM
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.

SamMaster
21st Jan 2004, 08:08 AM
try decimals or negative values?

Smoke39
21st Jan 2004, 06:44 PM
No luck. :(

SamMaster
21st Jan 2004, 07:57 PM
damn... this goes beyind here I think. check up codng part of the BU forums