summaryrefslogtreecommitdiff
path: root/src/dungeon.c
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2012-03-04 21:04:18 +0100
committerBardur Arantsson <bardur@scientician.net>2012-03-29 20:41:39 +0200
commitfc907a583d958c3eb87bbe82cd34ca986d781627 (patch)
treed7900cab6abe9249746e089c07d95957c0ea0a8c /src/dungeon.c
parent1cef2bec6cfe51855e53ec29fa5ea64d506eb086 (diff)
Refactor: Remove duplicate code for autosaving.
Diffstat (limited to 'src/dungeon.c')
-rw-r--r--src/dungeon.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/dungeon.c b/src/dungeon.c
index c45a5b2e..8a54329e 100644
--- a/src/dungeon.c
+++ b/src/dungeon.c
@@ -465,13 +465,7 @@ static void pattern_teleport(void)
/* Accept request */
msg_format("You teleport 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;
@@ -3089,12 +3083,9 @@ static void process_world(void)
* The player is yanked up/down as soon as
* he loads the autosaved game.
*/
- if (autosave_l && (p_ptr->word_recall == 1))
+ if (p_ptr->word_recall == 1)
{
- is_autosave = TRUE;
- msg_print("Autosaving the game...");
- do_cmd_save_game();
- is_autosave = FALSE;
+ autosave_checkpoint();
}
/* Make SURE that persistent levels are saved