From fc907a583d958c3eb87bbe82cd34ca986d781627 Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Sun, 4 Mar 2012 21:04:18 +0100 Subject: Refactor: Remove duplicate code for autosaving. --- src/cmd6.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'src/cmd6.c') diff --git a/src/cmd6.c b/src/cmd6.c index febaa029..db89c465 100644 --- a/src/cmd6.c +++ b/src/cmd6.c @@ -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; -- cgit v1.2.3