mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-22 12:01:25 +00:00
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:
parent
a38b2d607e
commit
83f40b8c49
2 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue