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

Comparing deliantra/server/server/main.C (file contents):
Revision 1.48 by root, Mon Dec 18 03:49:39 2006 UTC vs.
Revision 1.49 by root, Wed Dec 20 09:14:22 2006 UTC

1191 write_todclock (); /* lets just write the clock here */ 1191 write_todclock (); /* lets just write the clock here */
1192} 1192}
1193 1193
1194/* clean up everything before exiting */ 1194/* clean up everything before exiting */
1195void 1195void
1196cleanup (void) 1196cleanup (bool make_core)
1197{ 1197{
1198 LOG (llevDebug, "Cleanup called.\n"); 1198 LOG (llevDebug, "Cleanup called.\n");
1199 1199
1200 if (init_done)
1201 {
1200 for (player *pl = first_player; pl != NULL; pl = pl->next) 1202 for (player *pl = first_player; pl != NULL; pl = pl->next)
1201 save_player (pl->ob, 0); 1203 save_player (pl->ob, 0);
1202 1204
1203 for (player *pl = first_player; pl != NULL; pl = pl->next) 1205 for (player *pl = first_player; pl != NULL; pl = pl->next)
1204 if (!QUERY_FLAG (pl->ob, FLAG_REMOVED)) 1206 if (!QUERY_FLAG (pl->ob, FLAG_REMOVED))
1205 leave_map (pl->ob); 1207 leave_map (pl->ob);
1206 1208
1207 clean_tmp_files (); 1209 clean_tmp_files ();
1208 write_book_archive (); 1210 write_book_archive ();
1209 1211
1210 INVOKE_GLOBAL (CLEANUP); 1212 INVOKE_GLOBAL (CLEANUP);
1213 }
1211 1214
1215 if (make_core)
1216 abort ();
1217 else
1212 _exit (0); 1218 _exit (0);
1213} 1219}
1214 1220
1215void 1221void
1216leave (player *pl, int draw_exit) 1222leave (player *pl, int draw_exit)
1217{ 1223{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines