mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Don't mix from uninitialized slot vertices.
This commit is contained in:
parent
8896eef030
commit
17ba6e2354
@ -582,11 +582,14 @@ namespace Spine {
|
|||||||
int vertexCount = frameVertices[0].Length;
|
int vertexCount = frameVertices[0].Length;
|
||||||
|
|
||||||
float[] vertices = slot.attachmentVertices;
|
float[] vertices = slot.attachmentVertices;
|
||||||
|
|
||||||
|
// Don't mix from uninitialized slot vertices.
|
||||||
|
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;
|
||||||
}
|
}
|
||||||
if (vertices.Length != vertexCount) alpha = 1; // Don't mix from uninitialized slot vertices.
|
|
||||||
slot.attachmentVerticesCount = vertexCount;
|
slot.attachmentVerticesCount = vertexCount;
|
||||||
|
|
||||||
if (time >= frames[frames.Length - 1]) { // Time is after last frame.
|
if (time >= frames[frames.Length - 1]) { // Time is after last frame.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user