… | |
… | |
122 | return false; |
122 | return false; |
123 | } |
123 | } |
124 | |
124 | |
125 | enemy = 0; |
125 | enemy = 0; |
126 | |
126 | |
127 | newmap->insert (this, x, y); |
127 | //newmap->insert (this, x, y); |
|
|
128 | newmap->insert (this, x, y, 0, INS_NO_AUTO_EXIT); |
128 | |
129 | |
129 | if (map == newmap) // see if we actually arrived there - insert might trigger a teleport |
130 | if (map == newmap) // see if we actually arrived there - insert might trigger a teleport |
130 | { |
131 | { |
131 | if (contr) |
132 | if (contr) |
132 | { |
133 | { |
… | |
… | |
286 | |
287 | |
287 | /* clean up everything before exiting */ |
288 | /* clean up everything before exiting */ |
288 | void |
289 | void |
289 | emergency_save () |
290 | emergency_save () |
290 | { |
291 | { |
291 | LOG (llevDebug, "emergency save begin.\n"); |
292 | LOG (llevInfo, "emergency_save: enter\n"); |
|
|
293 | |
|
|
294 | LOG (llevInfo, "emergency_save: saving book archive\n"); |
|
|
295 | write_book_archive (); |
292 | |
296 | |
293 | cfperl_emergency_save (); |
297 | cfperl_emergency_save (); |
294 | |
298 | |
295 | LOG (llevDebug, "saving book archive.\n"); |
|
|
296 | write_book_archive (); |
|
|
297 | |
|
|
298 | LOG (llevDebug, "emergency save done.\n"); |
299 | LOG (llevInfo, "emergency_save: leave\n"); |
299 | } |
300 | } |
300 | |
301 | |
301 | // send all clients some informational text |
302 | // send all clients some informational text |
302 | static void |
303 | static void |
303 | cleanup_inform (const char *cause, bool make_core) |
304 | cleanup_inform (const char *cause, bool make_core) |
… | |
… | |
322 | cleanup (const char *cause, bool make_core) |
323 | cleanup (const char *cause, bool make_core) |
323 | { |
324 | { |
324 | if (make_core) |
325 | if (make_core) |
325 | fork_abort (cause); |
326 | fork_abort (cause); |
326 | |
327 | |
327 | LOG (llevError, "cleanup cause: %s\n", cause); |
328 | LOG (make_core ? llevError : llevInfo, "cleanup cause: %s\n", cause); |
328 | |
329 | |
329 | if (!make_core) |
330 | if (!make_core) |
330 | cleanup_inform (cause, make_core); |
331 | cleanup_inform (cause, make_core); |
331 | |
332 | |
332 | LOG (llevDebug, "cleanup begin.\n"); |
333 | LOG (llevDebug, "cleanup begin.\n"); |