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/files.c | |
parent | 1cef2bec6cfe51855e53ec29fa5ea64d506eb086 (diff) |
Refactor: Remove duplicate code for autosaving.
Diffstat (limited to 'src/files.c')
-rw-r--r-- | src/files.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/files.c b/src/files.c index d1b3d4f9..ea331a15 100644 --- a/src/files.c +++ b/src/files.c @@ -4239,7 +4239,19 @@ void do_cmd_save_game(void) (void)strcpy(died_from, "(alive and well)"); } - +/* + * Auto-save depending on whether the auto save flag is set. + */ +void autosave_checkpoint() +{ + if (autosave_l) + { + is_autosave = TRUE; + msg_print("Autosaving the game..."); + do_cmd_save_game(); + is_autosave = FALSE; + } +} /* * Hack -- Calculates the total number of points earned -JWT- |