Simplicity is a virute... don't overcomplicate things.

This commit is contained in:
Inuyasha 2016-03-29 06:14:31 -07:00
parent a3e940fe65
commit 3dc4cfc229

View file

@ -95,13 +95,10 @@ static UINT32 initialseed = 0;
*/
ATTRINLINE static fixed_t FUNCINLINE __internal_prng__(void)
{
randomseed += 7069;
randomseed ^= randomseed << 17;
randomseed ^= randomseed >> 9;
randomseed *= 373;
randomseed ^= randomseed >> 13;
randomseed ^= randomseed >> 11;
randomseed ^= randomseed << 21;
randomseed ^= randomseed >> 15;
return (randomseed&((FRACUNIT-1)<<9))>>9;
return ( (randomseed*36548569) >> 4) & (FRACUNIT-1);
}
/** Provides a random fixed point number. Distribution is uniform.