summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
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);
}