Don't mix from uninitialized slot vertices.

Related to 27bab7bb951650c50c98b3b9b7bcc1fcb90c1570.
This commit is contained in:
NathanSweet 2016-03-29 03:14:03 +02:00
parent 8bc8595290
commit e114f04bba

View File

@ -612,11 +612,11 @@ function Animation.FfdTimeline.new ()
local frameVertices = self.frameVertices
local vertexCount = #frameVertices[0]
local vertices = slot.attachmentVertices
if not vertices or #vertices < vertexCount then
if not vertices or #vertices ~= vertexCount then
if #vertices < vertexCount then
vertices = {}
slot.attachmentVertices = vertices
end
if #vertices ~= vertexCount then
alpha = 1 -- Don't mix from uninitialized slot vertices.
end
slot.attachmentVerticesCount = vertexCount