File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -232,16 +232,21 @@ bool ActivityMan::SaveCurrentGame(const std::string& fileName) {
232
232
}
233
233
234
234
bool ActivityMan::LoadAndLaunchGame (const std::string& fileName) {
235
- m_SaveGameTask.wait ();
236
-
237
235
std::string filePath = g_PresetMan.GetFullModulePath (c_UserScriptedSavesModuleName) + " /" + fileName;
238
236
239
237
// load zip sav file
240
238
std::string saveFilePath = filePath + " .ccsave" ;
241
239
unzFile zippedSaveFile = unzOpen (saveFilePath.c_str ());
242
240
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
+ }
245
250
}
246
251
247
252
unz_file_info info;
You can’t perform that action at this time.
0 commit comments