mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
Don't mix from uninitialized slot vertices.
One less and more correct check.
This commit is contained in:
parent
17ba6e2354
commit
27bab7bb95
@ -582,10 +582,9 @@ namespace Spine {
|
|||||||
int vertexCount = frameVertices[0].Length;
|
int vertexCount = frameVertices[0].Length;
|
||||||
|
|
||||||
float[] vertices = slot.attachmentVertices;
|
float[] vertices = slot.attachmentVertices;
|
||||||
|
if (slot.attachmentVerticesCount != vertexCount) alpha = 1; // Don't mix from uninitialized slot vertices.
|
||||||
|
|
||||||
// Don't mix from uninitialized slot vertices.
|
// Ensure capacity
|
||||||
if (slot.attachmentVerticesCount == 0 || vertices.Length != vertexCount) alpha = 1;
|
|
||||||
|
|
||||||
if (vertices.Length < vertexCount) {
|
if (vertices.Length < vertexCount) {
|
||||||
vertices = new float[vertexCount];
|
vertices = new float[vertexCount];
|
||||||
slot.attachmentVertices = vertices;
|
slot.attachmentVertices = vertices;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user