From 3dc4cfc2290e99f0c77f8b661d04c9e6a8669ca6 Mon Sep 17 00:00:00 2001 From: Inuyasha Date: Tue, 29 Mar 2016 06:14:31 -0700 Subject: [PATCH] Simplicity is a virute... don't overcomplicate things. --- src/m_random.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/m_random.c b/src/m_random.c index 97b654c1..d3d3f98c 100644 --- a/src/m_random.c +++ b/src/m_random.c @@ -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.