- Introduce seeding of the random number generator at startup

- Replaced all engine-side occurances of rand() with random()
This commit is contained in:
Thilo Schulz 2009-05-31 19:48:28 +00:00
parent 7aed7e8861
commit b40f1507ea
5 changed files with 28 additions and 17 deletions

View file

@ -73,7 +73,7 @@ void SV_GetChallenge( netadr_t from ) {
// this is the first time this client has asked for a challenge
challenge = &svs.challenges[oldest];
challenge->challenge = ( (rand() << 16) ^ rand() ) ^ svs.time;
challenge->challenge = ( (random() << 16) ^ random() ) ^ svs.time;
challenge->adr = from;
challenge->firstTime = svs.time;
challenge->time = svs.time;