diff options
author | Stephan <5377412+Taschi120@users.noreply.github.com> | 2021-07-09 21:44:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-09 21:44:02 +0200 |
commit | a70aa5df4938a6a4459690c4666a5c39a3f5bf98 (patch) | |
tree | b5296b3077a2268dda8394bfc0745dac81d3345a /src/network | |
parent | ce813ce644c58bbf07509eb8c409ec60512deaf0 (diff) | |
download | openttd-a70aa5df4938a6a4459690c4666a5c39a3f5bf98.tar.xz |
Add #9188: netsave now keeps multiple version around, similar to autosave (#9395)
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/network_client.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/network/network_client.cpp b/src/network/network_client.cpp index 779ffe6fd..fe4d1249c 100644 --- a/src/network/network_client.cpp +++ b/src/network/network_client.cpp @@ -132,12 +132,8 @@ struct PacketReader : LoadFilter { */ void ClientNetworkEmergencySave() { - if (!_settings_client.gui.autosave_on_network_disconnect) return; - if (!_networking) return; - - const char *filename = "netsave.sav"; - Debug(net, 3, "Performing emergency save: {}", filename); - SaveOrLoad(filename, SLO_SAVE, DFT_GAME_FILE, AUTOSAVE_DIR, false); + static int _netsave_ctr = 0; + DoAutoOrNetsave(_netsave_ctr, true); } |