Is this better? srand only called once...

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4793 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Circlemaster 2014-11-23 22:56:37 +00:00
parent a38b2d607e
commit 83f40b8c49
2 changed files with 2 additions and 1 deletions

View file

@ -502,6 +502,7 @@ void Cmd_MVDConnect(cmdctxt_t *ctx)
} }
void Cmd_DirMVDConnect(cmdctxt_t *ctx) void Cmd_DirMVDConnect(cmdctxt_t *ctx)
{ {
srand(time(NULL));
Cmd_GenericConnect(ctx, "dir:", AD_NO); Cmd_GenericConnect(ctx, "dir:", AD_NO);
} }

View file

@ -742,7 +742,7 @@ qboolean Net_ConnectToDemoDirServer(sv_t* qtv, char *ip)
// FIXME: this is not really shuffling the demos, but does introduce some variety // FIXME: this is not really shuffling the demos, but does introduce some variety
if (file_count > 1) if (file_count > 1)
{ {
srand(time(NULL)); //srand(time(NULL));
while ((random_number = rand()%file_count + 1) == qtv->last_random_number); while ((random_number = rand()%file_count + 1) == qtv->last_random_number);
qtv->last_random_number = random_number; qtv->last_random_number = random_number;
} }