1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-23 06:29:11 +00:00

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

@@ -132,8 +132,8 @@ struct PacketReader : LoadFilter {
*/
void ClientNetworkEmergencySave()
{
static int _netsave_ctr = 0;
DoAutoOrNetsave(_netsave_ctr, true);
static FiosNumberedSaveName _netsave_ctr("netsave");
DoAutoOrNetsave(_netsave_ctr);
}