From 27bab7bb951650c50c98b3b9b7bcc1fcb90c1570 Mon Sep 17 00:00:00 2001 From: John Date: Tue, 29 Mar 2016 07:26:57 +0800 Subject: [PATCH] Don't mix from uninitialized slot vertices. One less and more correct check. --- spine-csharp/src/Animation.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/spine-csharp/src/Animation.cs b/spine-csharp/src/Animation.cs index 6af01ddf7..a802ef797 100644 --- a/spine-csharp/src/Animation.cs +++ b/spine-csharp/src/Animation.cs @@ -582,10 +582,9 @@ namespace Spine { int vertexCount = frameVertices[0].Length; float[] vertices = slot.attachmentVertices; + if (slot.attachmentVerticesCount != vertexCount) alpha = 1; // Don't mix from uninitialized slot vertices. - // Don't mix from uninitialized slot vertices. - if (slot.attachmentVerticesCount == 0 || vertices.Length != vertexCount) alpha = 1; - + // Ensure capacity if (vertices.Length < vertexCount) { vertices = new float[vertexCount]; slot.attachmentVertices = vertices;