1
0
Fork 0

Change: Allow dedicated server to use threaded saves. (#10787)

Co-authored-by: Jonathan G Rennison <j.g.rennison@gmail.com>
pull/10857/head
axet 2023-05-21 20:53:21 +03:00 committed by glx22
parent 2efd88d513
commit 60540f7df6
2 changed files with 2 additions and 2 deletions

View File

@ -112,7 +112,6 @@ struct PacketWriter : SaveFilter {
* we need to handle the save finish as well as the
* next connection might just be requesting a map. */
WaitTillSaved();
ProcessAsyncSaveFinish();
}
/**
@ -548,6 +547,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendMap()
}
if (this->status == STATUS_AUTHORIZED) {
WaitTillSaved();
this->savegame = new PacketWriter(this);
/* Now send the _frame_counter and how many packets are coming */

View File

@ -3142,7 +3142,7 @@ SaveOrLoadResult SaveOrLoad(const std::string &filename, SaveLoadOperation fop,
if (fop == SLO_SAVE) { // SAVE game
Debug(desync, 1, "save: {:08x}; {:02x}; {}", TimerGameCalendar::date, TimerGameCalendar::date_fract, filename);
if (_network_server || !_settings_client.gui.threaded_saves) threaded = false;
if (!_settings_client.gui.threaded_saves) threaded = false;
return DoSave(new FileWriter(fh), threaded);
}