summaryrefslogtreecommitdiff
path: root/src/cmd2.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/cmd2.c
parent1cef2bec6cfe51855e53ec29fa5ea64d506eb086 (diff)
Refactor: Remove duplicate code for autosaving.
Diffstat (limited to 'src/cmd2.c')
-rw-r--r--src/cmd2.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/cmd2.c b/src/cmd2.c
index ba6bee63..aefe8a7a 100644
--- a/src/cmd2.c
+++ b/src/cmd2.c
@@ -196,13 +196,7 @@ void do_cmd_go_up(void)
else
msg_print("You enter a maze of up staircases.");
- if (autosave_l)
- {
- is_autosave = TRUE;
- msg_print("Autosaving the game...");
- do_cmd_save_game();
- is_autosave = FALSE;
- }
+ autosave_checkpoint();
if (p_ptr->inside_quest)
{
@@ -433,13 +427,7 @@ void do_cmd_go_down(void)
msg_print("You enter a maze of down staircases.");
}
- if (autosave_l)
- {
- is_autosave = TRUE;
- msg_print("Autosaving the game...");
- do_cmd_save_game();
- is_autosave = FALSE;
- }
+ autosave_checkpoint();
/* Go down */
if (go_down)