mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-05 09:15:33 +00:00
Fix parsing of some key lists
It seems some still want you to read the interpolation type even when there's no keys.
This commit is contained in:
parent
939d0d2fc5
commit
5a381006e5
2 changed files with 5 additions and 4 deletions
|
@ -394,9 +394,9 @@ struct NiMorphData : public Record
|
|||
nif->getChar();
|
||||
|
||||
mMorphs.resize(morphCount);
|
||||
for(int i=0; i<morphCount; i++)
|
||||
for(int i = 0;i < morphCount;i++)
|
||||
{
|
||||
mMorphs[i].mData.read(nif);
|
||||
mMorphs[i].mData.read(nif, true);
|
||||
|
||||
mMorphs[i].mVertices.resize(vertCount);
|
||||
for(int j = 0;j < vertCount;j++)
|
||||
|
|
|
@ -263,10 +263,11 @@ struct KeyListT {
|
|||
int mInterpolationType;
|
||||
VecType mKeys;
|
||||
|
||||
void read(NIFFile *nif)
|
||||
void read(NIFFile *nif, bool force=false)
|
||||
{
|
||||
size_t count = nif->getInt();
|
||||
if(count == 0) return;
|
||||
if(count == 0 && !force)
|
||||
return;
|
||||
|
||||
mInterpolationType = nif->getInt();
|
||||
mKeys.resize(count);
|
||||
|
|
Loading…
Reference in a new issue