1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Restore save compatibility with 1.6

This commit is contained in:
Ivan Savenko
2025-04-16 17:05:52 +03:00
parent 77845f74bc
commit a43c3fcb31
27 changed files with 429 additions and 140 deletions

View File

@@ -64,7 +64,11 @@ void CMapInfo::saveInit(const ResourcePath & file)
mapHeader = std::make_unique<CMapHeader>();
scenarioOptionsOfSave = std::make_unique<StartInfo>();
lf.load(*mapHeader);
lf.load(*scenarioOptionsOfSave);
if (lf.hasFeature(ESerializationVersion::NO_RAW_POINTERS_IN_SERIALIZER))
lf.load(*scenarioOptionsOfSave);
else
lf.load(scenarioOptionsOfSave);
fileURI = file.getName();
originalFileURI = file.getOriginalName();
fullFileURI = getFullFileURI(file);