mirror of https://github.com/OpenTTD/OpenTTD
Change: Allow dedicated server to use threaded saves. (#10787)
Co-authored-by: Jonathan G Rennison <j.g.rennison@gmail.com>pull/10857/head
parent
2efd88d513
commit
60540f7df6
|
@ -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 */
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue