]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
seed the random number generator with the current time at startup (quake never seeded it)
authorlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 25 Mar 2002 22:46:41 +0000 (22:46 +0000)
committerlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 25 Mar 2002 22:46:41 +0000 (22:46 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@1674 d7cf8633-e32d-0410-b094-e92efae38249

host.c

diff --git a/host.c b/host.c
index 1a20443e9c996ce9814f5aeb203e24db7a5c1335..7ff8874339cd0acf42e1bd8ae8303041447354c0 100644 (file)
--- 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 <time.h>
 
 /*
 
@@ -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