summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorStephan <5377412+Taschi120@users.noreply.github.com>2021-07-09 21:44:02 +0200
committerGitHub <noreply@github.com>2021-07-09 21:44:02 +0200
commita70aa5df4938a6a4459690c4666a5c39a3f5bf98 (patch)
treeb5296b3077a2268dda8394bfc0745dac81d3345a /src/network
parentce813ce644c58bbf07509eb8c409ec60512deaf0 (diff)
downloadopenttd-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.cpp8
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);
}