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

Comparing deliantra/server/server/swap.C (file contents):
Revision 1.11 by root, Mon Dec 18 02:35:01 2006 UTC vs.
Revision 1.12 by root, Mon Dec 18 03:49:39 2006 UTC

40 if (!(fp = fopen (buf, "w"))) 40 if (!(fp = fopen (buf, "w")))
41 { 41 {
42 LOG (llevError, "Could not open %s for writing\n", buf); 42 LOG (llevError, "Could not open %s for writing\n", buf);
43 return; 43 return;
44 } 44 }
45
45 for (map = first_map; map != NULL; map = map->next) 46 for (map = first_map; map != NULL; map = map->next)
46 { 47 {
47 /* If tmpname is null, it is probably a unique player map, 48 /* If tmpname is null, it is probably a unique player map,
48 * so don't save information on it. 49 * so don't save information on it.
49 */ 50 */
50 if (map->in_memory != MAP_IN_MEMORY && (map->tmpname != NULL) && (strncmp (map->path, "/random", 7))) 51 if (map->in_memory != MAP_IN_MEMORY && map->tmpname)
51 { 52 {
52 /* the 0 written out is a leftover from the lock number for 53 /* the 0 written out is a leftover from the lock number for
53 * unique items and second one is from encounter maps. 54 * unique items and second one is from encounter maps.
54 * Keep using it so that old temp files continue 55 * Keep using it so that old temp files continue
55 * to work. 56 * to work.
56 */ 57 */
57 fprintf (fp, "%s:%s:%ld:0:0:%d:0:%d\n", map->path, map->tmpname, 58 fprintf (fp, "%s:%s:%ld:0:0:%d:0:%d\n", map->path, map->tmpname,
58 (map->reset_time == (uint32) - 1 ? (long unsigned) -1 : map->reset_time - current_time), map->difficulty, map->darkness); 59 (map->reset_time == (uint32) - 1 ? (long unsigned) -1 : map->reset_time - current_time), map->difficulty, map->darkness);
59 } 60 }
60 } 61 }
62
61 fclose (fp); 63 fclose (fp);
62} 64}
63 65
64void 66void
65read_map_log (void) 67read_map_log (void)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines