Skip to content

Commit

Permalink
Suppress autosave in vehicles.
Browse files Browse the repository at this point in the history
  • Loading branch information
wito committed Jan 16, 2013
1 parent a2337b2 commit 0588d00
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ 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 && !u.in_vehicle)
if( get_input(autosave_timeout()) == IR_TIMEOUT)
{
autosave();
return false;
Expand Down Expand Up @@ -7892,11 +7892,13 @@ int game::autosave_timeout()

void game::autosave()
{
if (!moves_since_last_save && !item_exchanges_since_save)
return;
save();
moves_since_last_save = 0;
item_exchanges_since_save = 0;
if (!moves_since_last_save && !item_exchanges_since_save && !u.in_vehicle)
return;

save();

moves_since_last_save = 0;
item_exchanges_since_save = 0;
}

void intro()
Expand Down

0 comments on commit 0588d00

Please sign in to comment.