From 9336c78b2584b51c30be5acbb0f8b847cd4412ed Mon Sep 17 00:00:00 2001 From: thilo Date: Sun, 31 May 2009 20:24:10 +0000 Subject: Revert changes of rand() to random() as random() was redefined in quake3. git-svn-id: svn://svn.icculus.org/quake3/trunk@1562 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/renderer/tr_noise.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'code/renderer') diff --git a/code/renderer/tr_noise.c b/code/renderer/tr_noise.c index f27e6ab..5d550a3 100644 --- a/code/renderer/tr_noise.c +++ b/code/renderer/tr_noise.c @@ -44,10 +44,12 @@ void R_NoiseInit( void ) { int i; + srand( 1001 ); + for ( i = 0; i < NOISE_SIZE; i++ ) { - s_noise_table[i] = ( float ) ( ( ( random() / ( float ) RAND_MAX ) * 2.0 - 1.0 ) ); - s_noise_perm[i] = ( unsigned char ) ( random() / ( float ) RAND_MAX * 255 ); + s_noise_table[i] = ( float ) ( ( ( rand() / ( float ) RAND_MAX ) * 2.0 - 1.0 ) ); + s_noise_perm[i] = ( unsigned char ) ( rand() / ( float ) RAND_MAX * 255 ); } } -- cgit v1.2.3