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.46 by root, Fri Dec 15 04:21:29 2006 UTC vs.
Revision 1.47 by root, Mon Dec 18 02:35:01 2006 UTC

31# ifdef HAVE_CRYPT_H 31# ifdef HAVE_CRYPT_H
32# include <crypt.h> 32# include <crypt.h>
33# endif 33# endif
34#endif 34#endif
35 35
36#ifndef __CEXTRACT__
37# include <sproto.h> 36#include <sproto.h>
38#endif
39
40#ifdef HAVE_TIME_H
41# include <time.h> 37#include <time.h>
42#endif
43 38
44#include <../random_maps/random_map.h> 39#include <../random_maps/random_map.h>
45#include <../random_maps/rproto.h> 40#include <../random_maps/rproto.h>
46#include "path.h" 41#include "path.h"
47 42
1197 1192
1198 /* We save the maps - it may not be intuitive why, but if there are unique 1193 /* We save the maps - it may not be intuitive why, but if there are unique
1199 * items, we need to save the map so they get saved off. Perhaps we should 1194 * items, we need to save the map so they get saved off. Perhaps we should
1200 * just make a special function that only saves the unique items. 1195 * just make a special function that only saves the unique items.
1201 */ 1196 */
1202 for (m = first_map; m != NULL; m = next) 1197 for (m = first_map; m; m = next)
1203 { 1198 {
1204 next = m->next; 1199 next = m->next;
1200
1205 if (m->in_memory == MAP_IN_MEMORY) 1201 if (m->in_memory == MAP_IN_MEMORY)
1206 { 1202 {
1207 /* If we want to reuse the temp maps, swap it out (note that will also 1203 /* If we want to reuse the temp maps, swap it out (note that will also
1208 * update the log file. Otherwise, save the map (mostly for unique item 1204 * update the log file.
1209 * stuff). Note that the clean_tmp_map is called after the end of
1210 * the for loop but is in the #else bracket. IF we are recycling the maps,
1211 * we certainly don't want the temp maps removed.
1212 */ 1205 */
1213 1206
1214 /* XXX The above comment is dead wrong */
1215 if (settings.recycle_tmp_maps == TRUE)
1216 swap_map (m); 1207 swap_map (m);
1217 else
1218 {
1219 new_save_map (m, 0); /* note we save here into a overlay map */
1220 clean_tmp_map (m);
1221 } 1208 }
1222 }
1223 } 1209 }
1210
1224 write_todclock (); /* lets just write the clock here */ 1211 write_todclock (); /* lets just write the clock here */
1225} 1212}
1226 1213
1227/* clean up everything before exiting */ 1214/* clean up everything before exiting */
1228void 1215void

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines