Fix loading some YCDs

This commit is contained in:
dexy 2019-11-02 18:37:21 +11:00
parent 6f0a7d99f9
commit b61899dedf
2 changed files with 8 additions and 2 deletions

View File

@ -1072,9 +1072,13 @@ namespace CodeWalker.GameFiles
for (int i = 0; i < Sequences.Length; i++) for (int i = 0; i < Sequences.Length; i++)
{ {
var thisSeq = animChannelList.Where(a => a.Sequence == i);
Sequences[i] = new AnimSequence(); Sequences[i] = new AnimSequence();
var thisSeq = animChannelList.Where(a => a.Sequence == i);
if (thisSeq.Count() == 0)
{ continue; }
Sequences[i].Channels = new AnimChannel[thisSeq.Max(a => a.Index) + 1]; Sequences[i].Channels = new AnimChannel[thisSeq.Max(a => a.Index) + 1];
for (int j = 0; j < Sequences[i].Channels.Length; j++) for (int j = 0; j < Sequences[i].Channels.Length; j++)

View File

@ -430,6 +430,8 @@ namespace CodeWalker.Rendering
var q = interpolate ? Quaternion.Slerp(q0, q1, falpha) : q0; var q = interpolate ? Quaternion.Slerp(q0, q1, falpha) : q0;
bone.AnimRotation = q; bone.AnimRotation = q;
break; break;
case 2: //scale?
break;
default: default:
break; break;
} }