--- deliantra/server/common/init.C 2006/12/30 10:16:10 1.18 +++ deliantra/server/common/init.C 2007/03/06 19:02:35 1.27 @@ -1,25 +1,26 @@ /* - CrossFire, A Multiplayer game for X-windows - - Copyright (C) 2002 Mark Wedel & Crossfire Development Team - Copyright (C) 1992 Frank Tore Johansen - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 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. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - The authors can be reached via e-mail at -*/ + * CrossFire, A Multiplayer game for X-windows + * + * Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team + * Copyright (C) 2002 Mark Wedel & Crossfire Development Team + * Copyright (C) 1992 Frank Tore Johansen + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 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. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * The authors can be reached via e-mail at + */ #define EXTERN // horrible hack @@ -81,7 +82,6 @@ BALANCED_STAT_LOSS, NOT_PERMADETH, SIMPLE_EXP, - RESET_LOCATION_TIME, SET_TITLE, RESURRECTION, SEARCH_ITEMS, @@ -148,9 +148,7 @@ void init_library (void) { - init_environ (); init_globals (); - init_vars (); init_block (); ReadBmapNames (); ReadSmooth (); @@ -163,7 +161,7 @@ } -/* init_environ initializes values from the environmental variables. +/* init_environ initialises values from the environmental variables. * it needs to be called very early, since command line options should * overwrite these if specified. */ @@ -201,12 +199,10 @@ settings.tmpdir = cp; } - /* * Initialises all global variables. * Might use environment-variables as default for some of them. */ - void init_globals (void) { @@ -231,11 +227,11 @@ if (at->clone.type == MAP) { if (at->clone.race) - strcpy (first_map_ext_path, at->clone.race); + first_map_ext_path = at->clone.race; if (EXIT_PATH (&at->clone)) { - strcpy (first_map_path, EXIT_PATH (&at->clone)); + first_map_path = EXIT_PATH (&at->clone); return; } } @@ -253,7 +249,6 @@ * Write out the current time to the file so time does not * reset every time the server reboots. */ - void write_todclock (void) { @@ -271,10 +266,9 @@ } /* - * Initializes the gametime and TOD counters + * initialises the gametime and TOD counters * Called by init_library(). */ - void init_clocks (void) { @@ -288,7 +282,7 @@ has_been_done = 1; sprintf (filename, "%s/clockdata", settings.localdir); - LOG (llevDebug, "Reading clockdata from %s...", filename); + LOG (llevDebug, "Reading clockdata from %s...\n", filename); if ((fp = fopen (filename, "r")) == NULL) { LOG (llevError, "Can't open %s.\n", filename); @@ -296,13 +290,14 @@ write_todclock (); return; } + fscanf (fp, "%lu", &todtick); LOG (llevDebug, "todtick=%lu\n", todtick); fclose (fp); } /* - * Initializes the attack messages. + * initialises the attack messages. * Called by init_library(). */ @@ -325,7 +320,7 @@ has_been_done = 1; sprintf (filename, "%s/attackmess", settings.datadir); - LOG (llevDebug, "Reading attack messages from %s...", filename); + LOG (llevDebug, "Reading attack messages from %s...\n", filename); if ((fp = open_and_uncompress (filename, 0, &comp)) == NULL) { LOG (llevError, "Can't open %s.\n", filename);