Feature: Persistant rotation of numbered auto/netsave after restart (#9397)

It was always starting from 0 on openttd restart.
Now the most recent auto/netsave number will be used as a base to generate the next filename.
This commit is contained in:
Loïc Guilloux
2021-07-17 12:48:35 +02:00
committed by GitHub
parent 16abdd5254
commit 460991ecf4
6 changed files with 77 additions and 18 deletions

View File

@@ -1393,7 +1393,7 @@ void StateGameLoop()
*/
static void DoAutosave()
{
static int _autosave_ctr = 0;
static FiosNumberedSaveName _autosave_ctr("autosave");
DoAutoOrNetsave(_autosave_ctr);
}