mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-19 00:06:42 +08:00
Fixed FfdTimeline for spine-c.
This commit is contained in:
parent
ab6e07765c
commit
53437a6159
@ -66,7 +66,7 @@ public class FfdTimeline extends CurveTimeline {
|
||||
var vertexCount:int = frameVertices[0].length;
|
||||
|
||||
var vertices:Vector.<Number> = slot.attachmentVertices;
|
||||
if (vertices.length != vertexCount) alpha = 1;
|
||||
if (vertices.length != vertexCount) alpha = 1; // Don't mix from uninitialized slot vertices.
|
||||
vertices.length = vertexCount;
|
||||
|
||||
var i:int;
|
||||
|
||||
@ -664,15 +664,15 @@ void _spFFDTimeline_apply (const spTimeline* timeline, spSkeleton* skeleton, flo
|
||||
return; /* Time is before first frame. */
|
||||
}
|
||||
|
||||
if (slot->attachmentVerticesCount == 0) alpha = 1;
|
||||
if (slot->attachmentVerticesCount != self->frameVerticesCount) alpha = 1; // Don't mix from uninitialized slot vertices.
|
||||
if (slot->attachmentVerticesCount < self->frameVerticesCount) {
|
||||
if (slot->attachmentVerticesCapacity < self->frameVerticesCount) {
|
||||
FREE(slot->attachmentVertices);
|
||||
slot->attachmentVertices = MALLOC(float, self->frameVerticesCount);
|
||||
slot->attachmentVerticesCapacity = self->frameVerticesCount;
|
||||
}
|
||||
slot->attachmentVerticesCount = self->frameVerticesCount;
|
||||
}
|
||||
slot->attachmentVerticesCount = self->frameVerticesCount;
|
||||
|
||||
if (time >= self->frames[self->framesCount - 1]) {
|
||||
/* Time is after last frame. */
|
||||
|
||||
@ -580,7 +580,7 @@ namespace Spine {
|
||||
int vertexCount = frameVertices[0].Length;
|
||||
|
||||
float[] vertices = slot.attachmentVertices;
|
||||
if (vertices.Length != vertexCount) alpha = 1;
|
||||
if (vertices.Length != vertexCount) alpha = 1; // Don't mix from uninitialized slot vertices.
|
||||
if (vertices.Length < vertexCount) {
|
||||
vertices = new float[vertexCount];
|
||||
slot.attachmentVertices = vertices;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user