Skip to content

Commit

Permalink
Don't assert on loading games which have already been won/lost.
Browse files Browse the repository at this point in the history
Fixes ticket:4590 and ticket:3928.
  • Loading branch information
Cyp committed Jun 3, 2017
1 parent c1131be commit 77f9e5c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions src/levels.cpp
Expand Up @@ -984,6 +984,12 @@ bool levLoadData(char const *name, Sha256 const *hash, char *pSaveName, GAME_TYP
}
}

if (bMultiPlayer)
{
// This calls resLoadFile("SMSG", "multiplay.txt"). Must be before loadMissionExtras, which calls loadSaveMessage, which calls getViewData.
loadMultiScripts();
}

if (pSaveName != nullptr)
{
//load MidMission Extras
Expand All @@ -994,10 +1000,6 @@ bool levLoadData(char const *name, Sha256 const *hash, char *pSaveName, GAME_TYP
}
}

if (bMultiPlayer)
{
loadMultiScripts();
}
if (pSaveName != nullptr && saveType == GTYPE_SAVE_MIDMISSION)
{
//load script stuff
Expand Down
2 changes: 1 addition & 1 deletion src/message.cpp
Expand Up @@ -737,7 +737,7 @@ const char *loadResearchViewData(const char *fileName)
ini.endGroup();
apsViewData.insert(v->pName, v);
}
return filedup; // so that cleanup function will be called on rigth data
return filedup; // so that cleanup function will be called on right data
}

/* Get the view data identified by the name */
Expand Down

0 comments on commit 77f9e5c

Please sign in to comment.