fix load game crash

This commit is contained in:
kdmcser
2025-05-03 20:01:58 +08:00
parent ac26b3ed9b
commit 1c6d45d5b1
+3 -3
View File
@@ -1766,13 +1766,13 @@ void CGameState::loadGame(CLoadFile & file)
logGlobal->info("Loading game state...");
CMapHeader dummyHeader;
auto startInfo = std::make_shared<StartInfo>();
StartInfo dummyStartInfo;
ActiveModsInSaveList dummyActiveMods;
file.load(dummyHeader);
if (file.hasFeature(ESerializationVersion::NO_RAW_POINTERS_IN_SERIALIZER))
{
file.load(startInfo);
file.load(dummyStartInfo);
file.load(dummyActiveMods);
file.load(*this);
}
@@ -1781,7 +1781,7 @@ void CGameState::loadGame(CLoadFile & file)
bool dummyA = false;
uint32_t dummyB = 0;
uint16_t dummyC = 0;
file.load(startInfo);
file.load(dummyStartInfo);
file.load(dummyActiveMods);
file.load(dummyA);
file.load(dummyB);