Change: base autosaves intervals on real time (instead of game time) (#10655)
There are two fundamental issues with autosave: - When fast-forwarding, it saves way too often - When paused, it never saves Both makes no sense. Autosaves are meant to prevent you from accidentally losing your work. The emphasis on "your" work. To solve both issues, the autosave now works on real time. You can select every 10 / 30 / 60 / 120 minutes, which are similar to what the setting was in game-months. When you pause, autosaving will stop. Unless you make any change to the game; then it will continue to make autosaves, even so the game is paused. Unpausing / pausing resets this mechanism.
This commit is contained in:
@@ -173,6 +173,11 @@ CommandCost CmdPause(DoCommandFlag flags, PauseMode mode, bool pause)
|
||||
_pause_mode |= mode;
|
||||
} else {
|
||||
_pause_mode &= ~mode;
|
||||
|
||||
/* If the only remaining reason to be paused is that we saw a command during pause, unpause. */
|
||||
if (_pause_mode == PM_COMMAND_DURING_PAUSE) {
|
||||
_pause_mode = PM_UNPAUSED;
|
||||
}
|
||||
}
|
||||
|
||||
NetworkHandlePauseChange(prev_mode, mode);
|
||||
|
Reference in New Issue
Block a user