mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-05-27 22:00:23 -04:00
Fixed #190
This commit is contained in:
parent
9385b4da76
commit
79af119cf4
@ -679,20 +679,22 @@ namespace AssetStudio
|
|||||||
{
|
{
|
||||||
m_Legacy = reader.ReadBoolean();
|
m_Legacy = reader.ReadBoolean();
|
||||||
}
|
}
|
||||||
else
|
else if (version[0] >= 4)//4.0 and up
|
||||||
{
|
{
|
||||||
m_AnimationType = reader.ReadInt32();
|
m_AnimationType = reader.ReadInt32();
|
||||||
if (m_AnimationType == 1)
|
if (m_AnimationType == 1)
|
||||||
m_Legacy = true;
|
m_Legacy = true;
|
||||||
}
|
}
|
||||||
m_Compressed = reader.ReadBoolean();
|
else
|
||||||
m_UseHighQualityCurve = reader.ReadBoolean();
|
|
||||||
reader.AlignStream(4);
|
|
||||||
if (m_Compressed)
|
|
||||||
{
|
{
|
||||||
//TODO
|
m_Legacy = true;
|
||||||
}
|
}
|
||||||
|
m_Compressed = reader.ReadBoolean();
|
||||||
|
if (version[0] > 4 || (version[0] == 4 && version[1] >= 3))//4.3 and up
|
||||||
|
{
|
||||||
|
m_UseHighQualityCurve = reader.ReadBoolean();
|
||||||
|
}
|
||||||
|
reader.AlignStream(4);
|
||||||
int numRCurves = reader.ReadInt32();
|
int numRCurves = reader.ReadInt32();
|
||||||
m_RotationCurves = new List<QuaternionCurve>(numRCurves);
|
m_RotationCurves = new List<QuaternionCurve>(numRCurves);
|
||||||
for (int i = 0; i < numRCurves; i++)
|
for (int i = 0; i < numRCurves; i++)
|
||||||
@ -738,20 +740,31 @@ namespace AssetStudio
|
|||||||
m_FloatCurves.Add(new FloatCurve(preloadData));
|
m_FloatCurves.Add(new FloatCurve(preloadData));
|
||||||
}
|
}
|
||||||
|
|
||||||
int numPtrCurves = reader.ReadInt32();
|
if (version[0] > 4 || (version[0] == 4 && version[1] >= 3)) //4.3 and up
|
||||||
m_PPtrCurves = new List<PPtrCurve>(numPtrCurves);
|
|
||||||
for (int i = 0; i < numPtrCurves; i++)
|
|
||||||
{
|
{
|
||||||
m_PPtrCurves.Add(new PPtrCurve(preloadData));
|
int numPtrCurves = reader.ReadInt32();
|
||||||
|
m_PPtrCurves = new List<PPtrCurve>(numPtrCurves);
|
||||||
|
for (int i = 0; i < numPtrCurves; i++)
|
||||||
|
{
|
||||||
|
m_PPtrCurves.Add(new PPtrCurve(preloadData));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_SampleRate = reader.ReadSingle();
|
m_SampleRate = reader.ReadSingle();
|
||||||
m_WrapMode = reader.ReadInt32();
|
m_WrapMode = reader.ReadInt32();
|
||||||
m_Bounds = new AABB(reader);
|
if (version[0] > 3 || (version[0] == 3 && version[1] >= 4)) //3.4 and up
|
||||||
m_MuscleClipSize = reader.ReadUInt32();
|
{
|
||||||
m_MuscleClip = new ClipMuscleConstant(reader, version);
|
m_Bounds = new AABB(reader);
|
||||||
m_ClipBindingConstant = new AnimationClipBindingConstant(preloadData);
|
}
|
||||||
|
if (version[0] >= 4)//4.0 and up
|
||||||
|
{
|
||||||
|
m_MuscleClipSize = reader.ReadUInt32();
|
||||||
|
m_MuscleClip = new ClipMuscleConstant(reader, version);
|
||||||
|
}
|
||||||
|
if (version[0] > 4 || (version[0] == 4 && version[1] >= 3)) //4.3 and up
|
||||||
|
{
|
||||||
|
m_ClipBindingConstant = new AnimationClipBindingConstant(preloadData);
|
||||||
|
}
|
||||||
/*int numEvents = reader.ReadInt32();
|
/*int numEvents = reader.ReadInt32();
|
||||||
m_Events = new List<AnimationEvent>(numEvents);
|
m_Events = new List<AnimationEvent>(numEvents);
|
||||||
for (int i = 0; i < numEvents; i++)
|
for (int i = 0; i < numEvents; i++)
|
||||||
|
@ -1353,6 +1353,7 @@ namespace AssetStudio
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
uint j = 0;
|
||||||
for (int i = 0; i < m_SubMeshes[s].indexCount - 2; i++)
|
for (int i = 0; i < m_SubMeshes[s].indexCount - 2; i++)
|
||||||
{
|
{
|
||||||
uint fa = m_IndexBuffer[firstIndex + i];
|
uint fa = m_IndexBuffer[firstIndex + i];
|
||||||
@ -1373,8 +1374,11 @@ namespace AssetStudio
|
|||||||
m_Indices.Add(fb);
|
m_Indices.Add(fb);
|
||||||
}
|
}
|
||||||
m_materialIDs.Add(s);
|
m_materialIDs.Add(s);
|
||||||
|
j++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//just fix it
|
||||||
|
m_SubMeshes[s].indexCount = j * 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
Loading…
Reference in New Issue
Block a user