--- deliantra/server/common/init.C 2007/01/15 21:06:18 1.23 +++ deliantra/server/common/init.C 2007/04/12 14:18:04 1.31 @@ -82,7 +82,6 @@ BALANCED_STAT_LOSS, NOT_PERMADETH, SIMPLE_EXP, - RESET_LOCATION_TIME, SET_TITLE, RESURRECTION, SEARCH_ITEMS, @@ -149,17 +148,11 @@ void init_library (void) { - init_environ (); init_globals (); - init_vars (); init_block (); - ReadBmapNames (); - ReadSmooth (); - init_anim (); /* Must be after we read in the bitmaps */ init_archetypes (); /* Reads all archetypes from file */ init_dynamic (); init_attackmess (); - init_clocks (); init_experience (); } @@ -202,12 +195,10 @@ settings.tmpdir = cp; } - /* * Initialises all global variables. * Might use environment-variables as default for some of them. */ - void init_globals (void) { @@ -248,60 +239,6 @@ exit (-1); } -unsigned long todtick; - -/* - * Write out the current time to the file so time does not - * reset every time the server reboots. - */ - -void -write_todclock (void) -{ - char filename[MAX_BUF]; - FILE *fp; - - sprintf (filename, "%s/clockdata", settings.localdir); - if ((fp = fopen (filename, "w")) == NULL) - { - LOG (llevError, "Cannot open %s for writing\n", filename); - return; - } - fprintf (fp, "%lu", todtick); - fclose (fp); -} - -/* - * initialises the gametime and TOD counters - * Called by init_library(). - */ - -void -init_clocks (void) -{ - char filename[MAX_BUF]; - FILE *fp; - static int has_been_done = 0; - - if (has_been_done) - return; - else - has_been_done = 1; - - sprintf (filename, "%s/clockdata", settings.localdir); - LOG (llevDebug, "Reading clockdata from %s...\n", filename); - if ((fp = fopen (filename, "r")) == NULL) - { - LOG (llevError, "Can't open %s.\n", filename); - todtick = 0; - write_todclock (); - return; - } - fscanf (fp, "%lu", &todtick); - LOG (llevDebug, "todtick=%lu\n", todtick); - fclose (fp); -} - /* * initialises the attack messages. * Called by init_library().