aboutsummaryrefslogtreecommitdiffstats
path: root/code/server
diff options
context:
space:
mode:
authorthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2009-05-31 20:24:10 +0000
committerthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2009-05-31 20:24:10 +0000
commit9336c78b2584b51c30be5acbb0f8b847cd4412ed (patch)
tree18f1c617d3462360684b4ee08cb645b2b83aa075 /code/server
parente3fc31a512c6636777ab81a31eff789f2d4c64ff (diff)
downloadioquake3-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/server')
-rw-r--r--code/server/sv_client.c3
-rw-r--r--code/server/sv_init.c3
2 files changed, 3 insertions, 3 deletions
diff --git a/code/server/sv_client.c b/code/server/sv_client.c
index 6c3e2e0..f3d547c 100644
--- a/code/server/sv_client.c
+++ b/code/server/sv_client.c
@@ -72,8 +72,7 @@ void SV_GetChallenge( netadr_t from ) {
if (i == MAX_CHALLENGES) {
// this is the first time this client has asked for a challenge
challenge = &svs.challenges[oldest];
-
- challenge->challenge = ( (random() << 16) ^ random() ) ^ svs.time;
+ challenge->challenge = ( (rand() << 16) ^ rand() ) ^ svs.time;
challenge->adr = from;
challenge->firstTime = svs.time;
challenge->time = svs.time;
diff --git a/code/server/sv_init.c b/code/server/sv_init.c
index 47c9810..874aeaf 100644
--- a/code/server/sv_init.c
+++ b/code/server/sv_init.c
@@ -475,7 +475,8 @@ void SV_SpawnServer( char *server, qboolean killBots ) {
Cvar_Set("cl_paused", "0");
// get a new checksum feed and restart the file system
- sv.checksumFeed = ( ((int) random() << 16) ^ random() ) ^ Com_Milliseconds();
+ srand(Com_Milliseconds());
+ sv.checksumFeed = ( ((int) rand() << 16) ^ rand() ) ^ Com_Milliseconds();
FS_Restart( sv.checksumFeed );
CM_LoadMap( va("maps/%s.bsp", server), qfalse, &checksum );