浏览代码

Don't mix from uninitialized slot vertices.

One less and more correct check.
John 9 年之前
父节点
当前提交
27bab7bb95
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 2 3
      spine-csharp/src/Animation.cs

+ 2 - 3
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;