aboutsummaryrefslogtreecommitdiffstats
path: root/code/renderer
diff options
context:
space:
mode:
authorthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2009-05-31 19:48:28 +0000
committerthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2009-05-31 19:48:28 +0000
commite3fc31a512c6636777ab81a31eff789f2d4c64ff (patch)
treed13f686d79db091c7bbf5c5cc8a706a3d92ec70c /code/renderer
parent25f4f42f9bfa511cc7e170a379855f5c2419a8d2 (diff)
downloadioquake3-aero-e3fc31a512c6636777ab81a31eff789f2d4c64ff.tar.gz
ioquake3-aero-e3fc31a512c6636777ab81a31eff789f2d4c64ff.zip
- Introduce seeding of the random number generator at startup
- Replaced all engine-side occurances of rand() with random() git-svn-id: svn://svn.icculus.org/quake3/trunk@1561 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/renderer')
-rw-r--r--code/renderer/tr_noise.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/code/renderer/tr_noise.c b/code/renderer/tr_noise.c
index 5d550a3..f27e6ab 100644
--- a/code/renderer/tr_noise.c
+++ b/code/renderer/tr_noise.c
@@ -44,12 +44,10 @@ void R_NoiseInit( void )
{
int i;
- srand( 1001 );
-
for ( i = 0; i < NOISE_SIZE; i++ )
{
- s_noise_table[i] = ( float ) ( ( ( rand() / ( float ) RAND_MAX ) * 2.0 - 1.0 ) );
- s_noise_perm[i] = ( unsigned char ) ( rand() / ( float ) RAND_MAX * 255 );
+ s_noise_table[i] = ( float ) ( ( ( random() / ( float ) RAND_MAX ) * 2.0 - 1.0 ) );
+ s_noise_perm[i] = ( unsigned char ) ( random() / ( float ) RAND_MAX * 255 );
}
}