Merge branch 'dependenceday' into 'master'

Fix validating ESM3 file dependencies (#8252)

Closes #8252

See merge request OpenMW/openmw!4476
master
psi29a 3 weeks ago
commit 51579a8c5d

@ -223,6 +223,7 @@
Bug #8223: Ghosts don't move while spellcasting Bug #8223: Ghosts don't move while spellcasting
Bug #8231: AGOP doesn't like NiCollisionSwitch Bug #8231: AGOP doesn't like NiCollisionSwitch
Bug #8237: Non-bipedal creatures should *not* use spellcast equip/unequip animations Bug #8237: Non-bipedal creatures should *not* use spellcast equip/unequip animations
Bug #8252: Plugin dependencies are not required to be loaded
Feature #1415: Infinite fall failsafe Feature #1415: Infinite fall failsafe
Feature #2566: Handle NAM9 records for manual cell references Feature #2566: Handle NAM9 records for manual cell references
Feature #3501: OpenMW-CS: Instance Editing - Shortcuts for axial locking Feature #3501: OpenMW-CS: Instance Editing - Shortcuts for axial locking

@ -45,9 +45,10 @@ namespace MWWorld
reader->open(filepath); reader->open(filepath);
reader->resolveParentFileIndices(mReaders); reader->resolveParentFileIndices(mReaders);
assert(reader->getGameFiles().size() == reader->getParentFileIndices().size()); const std::vector<int>& parentIndices = reader->getParentFileIndices();
for (std::size_t i = 0, n = reader->getParentFileIndices().size(); i < n; ++i) assert(reader->getGameFiles().size() == parentIndices.size());
if (i == static_cast<std::size_t>(reader->getIndex())) for (std::size_t i = 0, n = parentIndices.size(); i < n; ++i)
if (parentIndices[i] == reader->getIndex())
throw std::runtime_error("File " + Files::pathToUnicodeString(reader->getName()) + " asks for parent file " throw std::runtime_error("File " + Files::pathToUnicodeString(reader->getName()) + " asks for parent file "
+ reader->getGameFiles()[i].name + reader->getGameFiles()[i].name
+ ", but it is not available or has been loaded in the wrong order. " + ", but it is not available or has been loaded in the wrong order. "

Loading…
Cancel
Save