mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Fix mixing from uninitialized slot vertices.
This commit is contained in:
parent
1a480cd707
commit
ee849c62eb
@ -667,8 +667,8 @@ void _spFFDTimeline_apply (const spTimeline* timeline, spSkeleton* skeleton, flo
|
||||
slot->attachmentVertices = MALLOC(float, self->frameVerticesCount);
|
||||
slot->attachmentVerticesCapacity = self->frameVerticesCount;
|
||||
}
|
||||
} else if (slot->attachmentVerticesCount > self->frameVerticesCount)
|
||||
alpha = 1; /* Don't mix from uninitialized slot vertices. */
|
||||
}
|
||||
if (slot->attachmentVerticesCount != self->frameVerticesCount) alpha = 1; /* Don't mix from uninitialized slot vertices. */
|
||||
slot->attachmentVerticesCount = self->frameVerticesCount;
|
||||
|
||||
if (time >= self->frames[self->framesCount - 1]) {
|
||||
|
||||
@ -580,8 +580,8 @@ namespace Spine {
|
||||
if (vertices.Length < vertexCount) {
|
||||
vertices = new float[vertexCount];
|
||||
slot.attachmentVertices = vertices;
|
||||
} else if (vertices.Length > vertexCount)
|
||||
alpha = 1; // Don't mix from uninitialized slot vertices.
|
||||
}
|
||||
if (vertices.Length != vertexCount) alpha = 1; // Don't mix from uninitialized slot vertices.
|
||||
slot.attachmentVerticesCount = vertexCount;
|
||||
|
||||
if (time >= frames[frames.Length - 1]) { // Time is after last frame.
|
||||
|
||||
@ -614,7 +614,8 @@ function Animation.FfdTimeline.new ()
|
||||
if #vertices < vertexCount then
|
||||
vertices = {}
|
||||
slot.attachmentVertices = vertices
|
||||
elseif #vertices < vertexCount then
|
||||
end
|
||||
if #vertices ~= vertexCount then
|
||||
alpha = 1 -- Don't mix from uninitialized slot vertices.
|
||||
end
|
||||
slot.attachmentVerticesCount = vertexCount
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user