diff options
author | thilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2009-05-31 20:24:10 +0000 |
---|---|---|
committer | thilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2009-05-31 20:24:10 +0000 |
commit | 9336c78b2584b51c30be5acbb0f8b847cd4412ed (patch) | |
tree | 18f1c617d3462360684b4ee08cb645b2b83aa075 /code/renderer | |
parent | e3fc31a512c6636777ab81a31eff789f2d4c64ff (diff) | |
download | ioquake3-aero-9336c78b2584b51c30be5acbb0f8b847cd4412ed.tar.gz ioquake3-aero-9336c78b2584b51c30be5acbb0f8b847cd4412ed.zip |
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
Diffstat (limited to 'code/renderer')
-rw-r--r-- | code/renderer/tr_noise.c | 6 |
1 files changed, 4 insertions, 2 deletions
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 ); } } |