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/client | |
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/client')
-rw-r--r-- | code/client/cl_main.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/code/client/cl_main.c b/code/client/cl_main.c index 08ee747..01c044a 100644 --- a/code/client/cl_main.c +++ b/code/client/cl_main.c @@ -1306,8 +1306,12 @@ void CL_RequestMotd( void ) { BigShort( cls.updateServer.port ) ); info[0] = 0; - - Com_sprintf( cls.updateChallenge, sizeof( cls.updateChallenge ), "%i", (random() << 16) ^ random()); + // NOTE TTimo xoring against Com_Milliseconds, otherwise we may not have a true randomization + // only srand I could catch before here is tr_noise.c l:26 srand(1001) + // https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=382 + // NOTE: the Com_Milliseconds xoring only affects the lower 16-bit word, + // but I decided it was enough randomization + Com_sprintf( cls.updateChallenge, sizeof( cls.updateChallenge ), "%i", ((rand() << 16) ^ rand()) ^ Com_Milliseconds()); Info_SetValueForKey( info, "challenge", cls.updateChallenge ); Info_SetValueForKey( info, "renderer", cls.glconfig.renderer_string ); |