From 6b9bb733601310784e192149e6402dab8ad40a74 Mon Sep 17 00:00:00 2001 From: lordhavoc Date: Mon, 25 Mar 2002 22:46:41 +0000 Subject: [PATCH] seed the random number generator with the current time at startup (quake never seeded it) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@1674 d7cf8633-e32d-0410-b094-e92efae38249 --- host.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/host.c b/host.c index 1a20443e..7ff88743 100644 --- a/host.c +++ b/host.c @@ -8,7 +8,7 @@ of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -20,6 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // host.c -- coordinates spawning and killing of local servers #include "quakedef.h" +#include /* @@ -791,6 +792,9 @@ Host_Init */ void Host_Init (void) { + // LordHavoc: quake never seeded the random number generator before... heh + srand(time(NULL)); + com_argc = host_parms.argc; com_argv = host_parms.argv; // FIXME: this is evil, but possibly temporary -- 2.39.2