From df5fc6946c9e2f426b8e028d8363af274a52f5bb Mon Sep 17 00:00:00 2001 From: Williham Totland Date: Wed, 16 Jan 2013 18:24:56 +0100 Subject: [PATCH] And finally, ACTUALLY improved autosave semantics. Sleeping and waiting should now only give one autosave, at the very beginning of the action. --- game.cpp | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/game.cpp b/game.cpp index f6c9902a93a0e..51dd59ae8e42a 100644 --- a/game.cpp +++ b/game.cpp @@ -665,28 +665,12 @@ bool game::do_turn() cleanup_dead(); if (!u.has_disease(DI_SLEEP) && u.activity.type == ACT_NULL) draw(); - if( get_input(autosave_timeout()) == IR_TIMEOUT) - { - autosave(); - return false; - } - if (is_game_over()) { - if (uquit == QUIT_DIED) - popup_top("Game over! Press spacebar..."); - if (uquit == QUIT_DIED || uquit == QUIT_SUICIDE) - death_screen(); - if (uquit == QUIT_DIED || uquit == QUIT_SUICIDE) - { - if (OPTIONS[OPT_DELETE_WORLD] == 1) - uquit = QUIT_DELETE_WORLD; - else if (OPTIONS[OPT_DELETE_WORLD] == 2) - if (query_yn("Delete the world and all saves?")) - uquit = QUIT_DELETE_WORLD; - } - return true; - } + + if (get_input(autosave_timeout()) == IR_GOOD) + ++moves_since_last_save; + + return false; } - ++moves_since_last_save; update_scent(); m.vehmove(this); m.process_fields(this);