mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-11 17:48:45 +08:00
Fixed bug loading skinned meshes.
This commit is contained in:
parent
82ea243dbb
commit
23d4d0558c
@ -534,9 +534,10 @@ spSkeletonData* spSkeletonJson_readSkeletonData (spSkeletonJson* self, const cha
|
||||
vertices[i] = entry->valueFloat;
|
||||
|
||||
for (i = 0; i < verticesCount;) {
|
||||
int boneCount = (int)vertices[i++];
|
||||
int boneCount = (int)vertices[i];
|
||||
mesh->bonesCount += boneCount + 1;
|
||||
mesh->weightsCount += boneCount * 3;
|
||||
i += 1 + boneCount * 4;
|
||||
}
|
||||
mesh->bones = MALLOC(int, mesh->bonesCount);
|
||||
mesh->weights = MALLOC(float, mesh->weightsCount);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user