summaryrefslogtreecommitdiff
path: root/src/common/core.c
diff options
context:
space:
mode:
authorhemagx <hemagx2@gmail.com>2016-02-17 21:43:45 +0200
committerHaru <haru@dotalux.com>2016-07-12 20:58:39 +0200
commit527cf1b812a117285957be820ba1dc31533e9073 (patch)
treef06aac6f2c19f3b2f6498a2f368ffb5c7aee99dc /src/common/core.c
parent2af9259a48ef9d7ec864fa80d1cb0392f2f2ee7a (diff)
downloadhercules-527cf1b812a117285957be820ba1dc31533e9073.tar.gz
hercules-527cf1b812a117285957be820ba1dc31533e9073.tar.bz2
hercules-527cf1b812a117285957be820ba1dc31533e9073.tar.xz
hercules-527cf1b812a117285957be820ba1dc31533e9073.zip
Interface random.c
Diffstat (limited to 'src/common/core.c')
-rw-r--r--src/common/core.c13
1 files changed, 7 insertions, 6 deletions
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()