diff --git a/src/client/GameSave.cpp b/src/client/GameSave.cpp index 48a1e0ccc6..2784a17eb3 100644 --- a/src/client/GameSave.cpp +++ b/src/client/GameSave.cpp @@ -51,9 +51,17 @@ GameSave::GameSave(const std::vector &data, bool newWantAuthors) void GameSave::MapPalette() { int partMap[PT_NUM]; + bool ignoreMissingErrors[PT_NUM]; for(int i = 0; i < PT_NUM; i++) { partMap[i] = i; + ignoreMissingErrors[i] = false; + } + if (version <= Version(98, 2)) + { + ignoreMissingErrors[PT_SNOW] = true; + ignoreMissingErrors[PT_RSST] = true; + ignoreMissingErrors[PT_RSSS] = true; } auto &sd = SimulationData::CRef(); @@ -90,12 +98,14 @@ void GameSave::MapPalette() } } } - auto paletteLookup = [this, &partMap](int type) { + auto paletteLookup = [this, &partMap](int type, bool ignoreMissingErrors) { if (type > 0 && type < PT_NUM) { auto carriedType = partMap[type]; if (!carriedType) // type is not 0 so this shouldn't be 0 either { + if (ignoreMissingErrors) + return type; missingElements.ids.insert(type); } type = carriedType; @@ -113,7 +123,7 @@ void GameSave::MapPalette() { continue; } - tempPart.type = paletteLookup(tempPart.type); + tempPart.type = paletteLookup(tempPart.type, false); for (auto index : possiblyCarriesType) { if (elements[tempPart.type].CarriesTypeIn & (1U << index)) @@ -121,7 +131,7 @@ void GameSave::MapPalette() auto *prop = reinterpret_cast(reinterpret_cast(&tempPart) + properties[index].Offset); auto carriedType = *prop & int(pmapmask); auto extra = *prop >> pmapbits; - carriedType = paletteLookup(carriedType); + carriedType = paletteLookup(carriedType, ignoreMissingErrors[tempPart.type]); *prop = PMAP(extra, carriedType); } } diff --git a/src/simulation/elements/SNOW.cpp b/src/simulation/elements/SNOW.cpp index 08b273cb05..f7a8158a86 100644 --- a/src/simulation/elements/SNOW.cpp +++ b/src/simulation/elements/SNOW.cpp @@ -35,6 +35,7 @@ void Element::Element_SNOW() Description = "Light particles. Created when ICE breaks under pressure."; Properties = TYPE_PART|PROP_NEUTPASS; + CarriesTypeIn = 1U << FIELD_CTYPE; LowPressure = IPL; LowPressureTransition = NT;