1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-03-30 11:36:42 +00:00

Only support NiSequenceStreamHelper as a Kf root

Newer versions of the Nif foramt may have other record types, but we don't
support those.
This commit is contained in:
Chris Robinson 2013-05-07 18:26:22 -07:00
parent 8e38dc410f
commit bf94ffb839

View file

@ -832,13 +832,13 @@ public:
const Nif::Record *r = nif->getRoot(0); const Nif::Record *r = nif->getRoot(0);
assert(r != NULL); assert(r != NULL);
const Nif::NiSequenceStreamHelper *seq = dynamic_cast<const Nif::NiSequenceStreamHelper*>(r); if(r->recType != Nif::RC_NiSequenceStreamHelper)
if(seq == NULL)
{ {
nif->warn("First root was not a NiSequenceStreamHelper, but a "+ nif->warn("First root was not a NiSequenceStreamHelper, but a "+
r->recName+"."); r->recName+".");
return; return;
} }
const Nif::NiSequenceStreamHelper *seq = static_cast<const Nif::NiSequenceStreamHelper*>(r);
Nif::ExtraPtr extra = seq->extra; Nif::ExtraPtr extra = seq->extra;
if(extra.empty() || extra->recType != Nif::RC_NiTextKeyExtraData) if(extra.empty() || extra->recType != Nif::RC_NiTextKeyExtraData)