[csharp] Fixed path constraint bone sorting.

Based on: c34db336d5
This commit is contained in:
John 2016-10-07 20:40:41 +08:00 committed by GitHub
parent c34db336d5
commit 7c6c6ef535

View File

@ -224,9 +224,13 @@ namespace Spine {
if (pathBones == null) if (pathBones == null)
SortBone(slotBone); SortBone(slotBone);
else { else {
var bones = this.bones; var bonesItems = this.bones.Items;
for (int i = 0, n = pathBones.Length; i < n; i++) for (int i = 0, n = pathBones.Length; i < n;) {
SortBone(bones.Items[pathBones[i]]); int nn = pathBones[i++];
nn += i;
while (i < nn)
SortBone(bonesItems[pathBones[i++]]);
}
} }
} }