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

Comparing deliantra/server/server/init.C (file contents):
Revision 1.24 by root, Sat Dec 30 15:07:59 2006 UTC vs.
Revision 1.25 by pippijn, Tue Jan 2 23:39:22 2007 UTC

379 FILE *fp; 379 FILE *fp;
380 materialtype_t *mt; 380 materialtype_t *mt;
381 int i, value; 381 int i, value;
382 382
383 sprintf (filename, "%s/materials", settings.datadir); 383 sprintf (filename, "%s/materials", settings.datadir);
384 LOG (llevDebug, "Reading material type data from %s...", filename); 384 LOG (llevDebug, "Reading material type data from %s...\n", filename);
385 if ((fp = fopen (filename, "r")) == NULL) 385 if ((fp = fopen (filename, "r")) == NULL)
386 { 386 {
387 LOG (llevError, "Cannot open %s for reading\n", filename); 387 LOG (llevError, "Cannot open %s for reading\n", filename);
388 mt = get_empty_mat (); 388 mt = get_empty_mat ();
389 mt->next = NULL; 389 mt->next = NULL;
1314 return; 1314 return;
1315 init_done = 1; 1315 init_done = 1;
1316 first_race = 0; 1316 first_race = 0;
1317 1317
1318 sprintf (fname, "%s/races", settings.datadir); 1318 sprintf (fname, "%s/races", settings.datadir);
1319 LOG (llevDebug, "Reading races from %s...", fname); 1319 LOG (llevDebug, "Reading races from %s...\n", fname);
1320 if (!(file = fopen (fname, "r"))) 1320 if (!(file = fopen (fname, "r")))
1321 { 1321 {
1322 LOG (llevError, "Cannot open races file %s: %s\n", fname, strerror (errno)); 1322 LOG (llevError, "Cannot open races file %s: %s\n", fname, strerror (errno));
1323 return; 1323 return;
1324 } 1324 }
1365 if (cp[strlen (cp) - 1] == '\n') 1365 if (cp[strlen (cp) - 1] == '\n')
1366 cp[strlen (cp) - 1] = '\0'; 1366 cp[strlen (cp) - 1] = '\0';
1367 1367
1368 /* set creature race to race value */ 1368 /* set creature race to race value */
1369 if ((mon = archetype::find (cp)) == NULL) 1369 if ((mon = archetype::find (cp)) == NULL)
1370 LOG (llevError, "\nCreature %s in race file lacks archetype", cp); 1370 LOG (llevError, "Creature %s in race file lacks archetype\n", cp);
1371 else 1371 else
1372 { 1372 {
1373 if (set_race && (!mon->clone.race || strcmp (mon->clone.race, race))) 1373 if (set_race && (!mon->clone.race || strcmp (mon->clone.race, race)))
1374 { 1374 {
1375 if (mon->clone.race) 1375 if (mon->clone.race)
1376 LOG (llevDebug, "\n Resetting race to %s from %s for archetype %s", race, &mon->clone.race, &mon->name); 1376 LOG (llevDebug, "Resetting race to %s from %s for archetype %s\n", race, &mon->clone.race, &mon->name);
1377 1377
1378 mon->clone.race = race; 1378 mon->clone.race = race;
1379 } 1379 }
1380 1380
1381 /* if the arch is a monster, add it to the race list */ 1381 /* if the arch is a monster, add it to the race list */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines