From b0ef42ae3ccbd5cbbb2acc6e09586c114f4c89c2 Mon Sep 17 00:00:00 2001 From: Evil Eye Date: Sat, 9 Dec 2023 18:05:57 +0100 Subject: [PATCH] Drop support for save game format 3 --- components/esm3/animationstate.cpp | 13 +------------ components/esm3/formatversion.hpp | 2 +- components/esm3/projectilestate.cpp | 7 ------- 3 files changed, 2 insertions(+), 20 deletions(-) diff --git a/components/esm3/animationstate.cpp b/components/esm3/animationstate.cpp index 14edf01a83..79dcad7578 100644 --- a/components/esm3/animationstate.cpp +++ b/components/esm3/animationstate.cpp @@ -21,18 +21,7 @@ namespace ESM anim.mGroup = esm.getHString(); esm.getHNOT(anim.mTime, "TIME"); esm.getHNOT(anim.mAbsolute, "ABST"); - - esm.getSubNameIs("COUN"); - // workaround bug in earlier version where size_t was used - esm.getSubHeader(); - if (esm.getSubSize() == 8) - esm.getT(anim.mLoopCount); - else - { - uint32_t loopcount; - esm.getT(loopcount); - anim.mLoopCount = (uint64_t)loopcount; - } + esm.getHNT(anim.mLoopCount, "COUN"); mScriptedAnims.push_back(anim); } diff --git a/components/esm3/formatversion.hpp b/components/esm3/formatversion.hpp index 854502b220..949cdadc38 100644 --- a/components/esm3/formatversion.hpp +++ b/components/esm3/formatversion.hpp @@ -26,7 +26,7 @@ namespace ESM inline constexpr FormatVersion MaxActiveSpellSlotIndexFormatVersion = 27; inline constexpr FormatVersion CurrentSaveGameFormatVersion = 29; - inline constexpr FormatVersion MinSupportedSaveGameFormatVersion = 3; + inline constexpr FormatVersion MinSupportedSaveGameFormatVersion = 4; inline constexpr FormatVersion OpenMW0_48SaveGameFormatVersion = 21; inline constexpr FormatVersion OpenMW0_49SaveGameFormatVersion = CurrentSaveGameFormatVersion; } diff --git a/components/esm3/projectilestate.cpp b/components/esm3/projectilestate.cpp index 15ff5fff64..bed9073999 100644 --- a/components/esm3/projectilestate.cpp +++ b/components/esm3/projectilestate.cpp @@ -37,18 +37,11 @@ namespace ESM BaseProjectileState::load(esm); mSpellId = esm.getHNRefId("SPEL"); - if (esm.isNextSub("SRCN")) // for backwards compatibility - esm.skipHSub(); - EffectList().load(esm); // for backwards compatibility esm.getHNT(mSpeed, "SPED"); if (esm.peekNextSub("ITEM")) mItem = esm.getFormId(true, "ITEM"); if (esm.isNextSub("SLOT")) // for backwards compatibility esm.skipHSub(); - if (esm.isNextSub("STCK")) // for backwards compatibility - esm.skipHSub(); - if (esm.isNextSub("SOUN")) // for backwards compatibility - esm.skipHSub(); } void ProjectileState::save(ESMWriter& esm) const