Revert changes of rand() to random() as random() was redefined in quake3.

This commit is contained in:
Thilo Schulz committed 2009-05-31 20:24:10 +00:00
1 parent b40f1507ea
commit e4d0c14f70
5 files changed
+17 -11

No files matched your search

+1 -2
View File
@@ -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;
+2 -1
View File
@@ -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 );