diff options
author | Bardur Arantsson <bardur@scientician.net> | 2012-03-04 21:04:18 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2012-03-29 20:41:39 +0200 |
commit | fc907a583d958c3eb87bbe82cd34ca986d781627 (patch) | |
tree | d7900cab6abe9249746e089c07d95957c0ea0a8c /src/cmd6.c | |
parent | 1cef2bec6cfe51855e53ec29fa5ea64d506eb086 (diff) |
Refactor: Remove duplicate code for autosaving.
Diffstat (limited to 'src/cmd6.c')
-rw-r--r-- | src/cmd6.c | 16 |
1 files changed, 2 insertions, 14 deletions
@@ -4632,13 +4632,7 @@ int ring_of_power() msg_print("The power of the ring destroys the world!"); msg_print("The world changes!"); - if (autosave_l) - { - is_autosave = TRUE; - msg_print("Autosaving the game..."); - do_cmd_save_game(); - is_autosave = FALSE; - } + autosave_checkpoint(); /* Leaving */ p_ptr->leaving = TRUE; @@ -5496,13 +5490,7 @@ const char *activation_aux(object_type * o_ptr, bool_ doit, int item) { if (get_check("Leave this level? ")) { - if (autosave_l) - { - is_autosave = TRUE; - msg_print("Autosaving the game..."); - do_cmd_save_game(); - is_autosave = FALSE; - } + autosave_checkpoint(); /* Leaving */ p_ptr->leaving = TRUE; |