1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-19 12:39:11 +00:00

Add #9188: netsave now keeps multiple version around, similar to autosave (#9395)

This commit is contained in:
Stephan
2021-07-09 21:44:02 +02:00
committed by GitHub
parent ce813ce644
commit a70aa5df49
4 changed files with 40 additions and 24 deletions

View File

@@ -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);
}