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.2 by root, Mon Mar 6 22:59:26 2006 UTC vs.
Revision 1.4 by root, Tue Mar 28 16:08:38 2006 UTC

1/* 1/*
2 * static char *rcsid_swap_c = 2 * static char *rcsid_swap_c =
3 * "$Id: swap.c,v 1.2 2006/03/06 22:59:26 root Exp $"; 3 * "$Id: swap.c,v 1.4 2006/03/28 16:08:38 root Exp $";
4 */ 4 */
5 5
6/* 6/*
7 CrossFire, A Multiplayer game for X-windows 7 CrossFire, A Multiplayer game for X-windows
8 8
146 146
147 /* If it is immediate reset time, don't bother saving it - just get 147 /* If it is immediate reset time, don't bother saving it - just get
148 * rid of it right away. 148 * rid of it right away.
149 */ 149 */
150 if (map->reset_time <= seconds()) { 150 if (map->reset_time <= seconds()) {
151 mapstruct *oldmap = map;
152
153 LOG(llevDebug,"Resetting map %s.\n",map->path); 151 LOG(llevDebug,"Resetting map %s.\n",map->path);
154 /* Lauwenmark : Here we handle the MAPRESET global event */ 152 /* Lauwenmark : Here we handle the MAPRESET global event */
155 execute_global_event(EVENT_MAPRESET, map->path); 153 execute_global_event(EVENT_MAPRESET, map);
156 map = map->next;
157 delete_map(oldmap); 154 delete_map(map);
158 return; 155 return;
159 } 156 }
160 157
161 if (new_save_map (map, 0) == -1) { 158 if (new_save_map (map, 0) == -1) {
162 LOG(llevError, "Failed to swap map %s.\n", map->path); 159 LOG(llevError, "Failed to swap map %s.\n", map->path);
293 m = m->next; 290 m = m->next;
294 } 291 }
295 else { 292 else {
296 LOG(llevDebug,"Resetting map %s.\n",m->path); 293 LOG(llevDebug,"Resetting map %s.\n",m->path);
297 /* Lauwenmark : Here we handle the MAPRESET global event */ 294 /* Lauwenmark : Here we handle the MAPRESET global event */
298 execute_global_event(EVENT_MAPRESET, m->path); 295 execute_global_event(EVENT_MAPRESET, m);
299 clean_tmp_map(m); 296 clean_tmp_map(m);
300 oldmap = m; 297 oldmap = m;
301 m = m->next; 298 m = m->next;
302 delete_map(oldmap); 299 delete_map(oldmap);
303 } 300 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines