From 83f40b8c49b087f4690db9096a13cdbde7516960 Mon Sep 17 00:00:00 2001 From: Circlemaster Date: Sun, 23 Nov 2014 22:56:37 +0000 Subject: [PATCH] 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 --- fteqtv/rcon.c | 1 + fteqtv/source.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/fteqtv/rcon.c b/fteqtv/rcon.c index 471890f83..44e751c7e 100644 --- a/fteqtv/rcon.c +++ b/fteqtv/rcon.c @@ -502,6 +502,7 @@ void Cmd_MVDConnect(cmdctxt_t *ctx) } void Cmd_DirMVDConnect(cmdctxt_t *ctx) { + srand(time(NULL)); Cmd_GenericConnect(ctx, "dir:", AD_NO); } diff --git a/fteqtv/source.c b/fteqtv/source.c index b03a38a0f..40734e83d 100644 --- a/fteqtv/source.c +++ b/fteqtv/source.c @@ -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 if (file_count > 1) { - srand(time(NULL)); + //srand(time(NULL)); while ((random_number = rand()%file_count + 1) == qtv->last_random_number); qtv->last_random_number = random_number; }