File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -232,16 +232,21 @@ bool ActivityMan::SaveCurrentGame(const std::string& fileName) {
232232}
233233
234234bool ActivityMan::LoadAndLaunchGame (const std::string& fileName) {
235- m_SaveGameTask.wait ();
236-
237235 std::string filePath = g_PresetMan.GetFullModulePath (c_UserScriptedSavesModuleName) + " /" + fileName;
238236
239237 // load zip sav file
240238 std::string saveFilePath = filePath + " .ccsave" ;
241239 unzFile zippedSaveFile = unzOpen (saveFilePath.c_str ());
242240 if (!zippedSaveFile) {
243- RTEError::ShowMessageBox (" Game loading failed! Make sure you have a saved game called \" " + fileName + " \" " );
244- return false ;
241+ // Might be trying to open one we're already saving too, wait until we finish saving and try again
242+ m_SaveGameTask.wait ();
243+ zippedSaveFile = unzOpen (saveFilePath.c_str ());
244+
245+ if (!zippedSaveFile) {
246+ // Some other process is stopping us from loading, oh well
247+ RTEError::ShowMessageBox (" Game loading failed! Make sure you have a saved game called \" " + fileName + " \" " );
248+ return false ;
249+ }
245250 }
246251
247252 unz_file_info info;
You can’t perform that action at this time.
0 commit comments