ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/init.C
(Generate patch)

Comparing deliantra/server/common/init.C (file contents):
Revision 1.25 by root, Tue Mar 6 03:06:00 2007 UTC vs.
Revision 1.26 by root, Tue Mar 6 14:01:10 2007 UTC

198 cp = getenv ("CROSSFIRE_TMPDIR"); 198 cp = getenv ("CROSSFIRE_TMPDIR");
199 if (cp) 199 if (cp)
200 settings.tmpdir = cp; 200 settings.tmpdir = cp;
201} 201}
202 202
203
204/* 203/*
205 * Initialises all global variables. 204 * Initialises all global variables.
206 * Might use environment-variables as default for some of them. 205 * Might use environment-variables as default for some of them.
207 */ 206 */
208
209void 207void
210init_globals (void) 208init_globals (void)
211{ 209{
212 if (settings.logfilename[0] == 0) 210 if (settings.logfilename[0] == 0)
213 logfile = stderr; 211 logfile = stderr;
250 248
251/* 249/*
252 * Write out the current time to the file so time does not 250 * Write out the current time to the file so time does not
253 * reset every time the server reboots. 251 * reset every time the server reboots.
254 */ 252 */
255
256void 253void
257write_todclock (void) 254write_todclock (void)
258{ 255{
259 char filename[MAX_BUF]; 256 char filename[MAX_BUF];
260 FILE *fp; 257 FILE *fp;
271 268
272/* 269/*
273 * initialises the gametime and TOD counters 270 * initialises the gametime and TOD counters
274 * Called by init_library(). 271 * Called by init_library().
275 */ 272 */
276
277void 273void
278init_clocks (void) 274init_clocks (void)
279{ 275{
280 char filename[MAX_BUF]; 276 char filename[MAX_BUF];
281 FILE *fp; 277 FILE *fp;
293 LOG (llevError, "Can't open %s.\n", filename); 289 LOG (llevError, "Can't open %s.\n", filename);
294 todtick = 0; 290 todtick = 0;
295 write_todclock (); 291 write_todclock ();
296 return; 292 return;
297 } 293 }
294
298 fscanf (fp, "%lu", &todtick); 295 fscanf (fp, "%lu", &todtick);
299 LOG (llevDebug, "todtick=%lu\n", todtick); 296 LOG (llevDebug, "todtick=%lu\n", todtick);
300 fclose (fp); 297 fclose (fp);
301} 298}
302 299

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines