Merge branch 'fullydynamic' into 'master'

Fix loading of 10.0.1.0 NiDynamicEffect

See merge request OpenMW/openmw!3336
macos_ci_fix
jvoisin 1 year ago
commit d45a3c4916

@ -12,9 +12,13 @@ namespace Nif
if (nif->getVersion() >= nif->generateVersion(10, 1, 0, 106)
&& nif->getBethVersion() < NIFFile::BethVersion::BETHVER_FO4)
nif->getBoolean(); // Switch state
unsigned int numAffectedNodes = nif->getUInt();
for (unsigned int i = 0; i < numAffectedNodes; ++i)
nif->getUInt(); // ref to another Node
if (nif->getVersion() <= NIFFile::VER_MW
|| (nif->getVersion() >= nif->generateVersion(10, 1, 0, 0)
&& nif->getBethVersion() < NIFFile::BethVersion::BETHVER_FO4))
{
size_t numAffectedNodes = nif->get<uint32_t>();
nif->skip(numAffectedNodes * 4);
}
}
void NiLight::read(NIFStream* nif)

@ -354,14 +354,14 @@ namespace Nif
if (rec.empty())
{
std::stringstream error;
error << "Record number " << i << " out of " << recNum << " is blank.";
error << "Record type is blank (index " << i << ")";
throw Nif::Exception(error.str(), filename);
}
// Record separator. Some Havok records in Oblivion do not have it.
if (hasRecordSeparators && !rec.starts_with("bhk"))
if (nif.getInt())
Log(Debug::Warning) << "NIFFile Warning: Record number " << i << " out of " << recNum
Log(Debug::Warning) << "NIFFile Warning: Record of type " << rec << ", index " << i
<< " is preceded by a non-zero separator. File: " << filename;
const auto entry = factories.find(rec);

Loading…
Cancel
Save