diff options
author | Loïc Guilloux <glx22@users.noreply.github.com> | 2021-07-17 12:48:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-17 12:48:35 +0200 |
commit | 460991ecf4fbeca2c0f8c39874b39a0885d6f67d (patch) | |
tree | bb4df8e1fba39293c8db4772c9b553a88a6fa58c /src/network | |
parent | 16abdd52546eb3cfa9d51d674c41711c2c170029 (diff) | |
download | openttd-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/network')
-rw-r--r-- | src/network/network_client.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/network_client.cpp b/src/network/network_client.cpp index 9f08062f3..d38437cc1 100644 --- a/src/network/network_client.cpp +++ b/src/network/network_client.cpp @@ -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); } |