1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2024-12-25 18:15:00 +00:00

Fix validating ESM3 file dependencies (#8252)

This commit is contained in:
Alexei Kotov 2024-12-07 07:49:51 +03:00
parent c207397c56
commit 11761c5a1d
2 changed files with 5 additions and 3 deletions

View File

@ -223,6 +223,7 @@
Bug #8223: Ghosts don't move while spellcasting
Bug #8231: AGOP doesn't like NiCollisionSwitch
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 #2566: Handle NAM9 records for manual cell references
Feature #3501: OpenMW-CS: Instance Editing - Shortcuts for axial locking

View File

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