From 527cf1b812a117285957be820ba1dc31533e9073 Mon Sep 17 00:00:00 2001 From: hemagx Date: Wed, 17 Feb 2016 21:43:45 +0200 Subject: Interface random.c --- src/common/core.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/common/core.c') diff --git a/src/common/core.c b/src/common/core.c index 314bdf947..f5860e992 100644 --- a/src/common/core.c +++ b/src/common/core.c @@ -25,15 +25,15 @@ #include "common/cbasetypes.h" #include "common/console.h" -#include "common/des.h" #include "common/db.h" +#include "common/des.h" #include "common/memmgr.h" #include "common/mmo.h" -#include "common/random.h" +#include "common/nullpo.h" #include "common/showmsg.h" #include "common/strlib.h" #include "common/sysinfo.h" -#include "common/nullpo.h" +#include "common/timer.h" #include "common/utils.h" #ifndef MINICORE @@ -42,10 +42,10 @@ # include "common/ers.h" # include "common/md5calc.h" # include "common/mutex.h" +# include "common/random.h" # include "common/socket.h" # include "common/sql.h" # include "common/thread.h" -# include "common/timer.h" #endif #ifndef _WIN32 @@ -264,6 +264,7 @@ void core_defaults(void) { timer_defaults(); db_defaults(); socket_defaults(); + rnd_defaults(); md5_defaults(); #endif } @@ -515,8 +516,7 @@ int main (int argc, char **argv) { timer->init(); /* timer first */ - rnd_init(); - srand((unsigned int)timer->gettick()); + rnd->init(); console->init(); @@ -543,6 +543,7 @@ int main (int argc, char **argv) { DB->final(); rathread_final(); ers_final(); + rnd->final(); #endif cmdline->final(); //sysinfo->final(); Called by iMalloc->final() -- cgit v1.2.3-70-g09d2