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/wizard2.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'src/wizard2.c') diff --git a/src/wizard2.c b/src/wizard2.c index f606fd72..e8a13b45 100644 --- a/src/wizard2.c +++ b/src/wizard2.c @@ -56,13 +56,7 @@ void teleport_player_town(int town) { int x = 0, y = 0; - if (autosave_l) - { - is_autosave = TRUE; - msg_print("Autosaving the game..."); - do_cmd_save_game(); - is_autosave = FALSE; - } + autosave_checkpoint(); /* Change town */ dun_level = 0; @@ -1446,13 +1440,7 @@ static void do_cmd_wiz_jump(void) /* Accept request */ msg_format("You jump to dungeon level %d.", command_arg); - if (autosave_l) - { - is_autosave = TRUE; - msg_print("Autosaving the game..."); - do_cmd_save_game(); - is_autosave = FALSE; - } + autosave_checkpoint(); /* Change level */ dun_level = command_arg; -- cgit v1.2.3