summaryrefslogtreecommitdiff
path: root/src/openttd.cpp
diff options
context:
space:
mode:
authorLoïc Guilloux <glx22@users.noreply.github.com>2021-07-17 12:48:35 +0200
committerGitHub <noreply@github.com>2021-07-17 12:48:35 +0200
commit460991ecf4fbeca2c0f8c39874b39a0885d6f67d (patch)
treebb4df8e1fba39293c8db4772c9b553a88a6fa58c /src/openttd.cpp
parent16abdd52546eb3cfa9d51d674c41711c2c170029 (diff)
downloadopenttd-460991ecf4fbeca2c0f8c39874b39a0885d6f67d.tar.xz
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.
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r--src/openttd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index 711df58c4..0ea1fa75d 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -1393,7 +1393,7 @@ void StateGameLoop()
*/
static void DoAutosave()
{
- static int _autosave_ctr = 0;
+ static FiosNumberedSaveName _autosave_ctr("autosave");
DoAutoOrNetsave(_autosave_ctr);
}