Add optional auto-save/restore feature using -a <filename> option
[open-adventure.git] / score.c
diff --git a/score.c b/score.c
index 7e6b28c26ae9ee02a96f3d596983f39a6abae393..24dcc0a29d7bcca580f720e052abed574953a58b 100644 (file)
--- a/score.c
+++ b/score.c
@@ -117,6 +117,9 @@ void terminate(enum termination mode)
 /* End of game.  Let's tell him all about it. */
 {
     int points = score(mode);
+#if defined ADVENT_AUTOSAVE
+    autosave();
+#endif
 
     if (points + game.trnluz + 1 >= mxscor && game.trnluz != 0)
         rspeak(TOOK_LONG);