瀏覽代碼

Don't clear FFD if before first FFD key in animation.

Didn't make any sense. Any existing FFD should remain until time passes a key.
NathanSweet 10 年之前
父節點
當前提交
ee1f13ab9c

+ 1 - 4
spine-as3/spine-as3/src/spine/animation/FfdTimeline.as

@@ -57,10 +57,7 @@ public class FfdTimeline extends CurveTimeline {
 		if (slot.attachment != attachment) return;
 
 		var frames:Vector.<Number> = this.frames;
-		if (time < frames[0]) {
-			slot.attachmentVertices.length = 0;
-			return; // Time is before first frame.
-		}
+		if (time < frames[0]) return; // Time is before first frame.
 
 		var frameVertices:Vector.<Vector.<Number>> = this.frameVertices;
 		var vertexCount:int = frameVertices[0].length;

+ 1 - 4
spine-c/src/spine/Animation.c

@@ -659,10 +659,7 @@ void _spFFDTimeline_apply (const spTimeline* timeline, spSkeleton* skeleton, flo
 	spSlot *slot = skeleton->slots[self->slotIndex];
 	if (slot->attachment != self->attachment) return;
 
-	if (time < self->frames[0]) {
-		slot->attachmentVerticesCount = 0;
-		return; /* Time is before first frame. */
-	}
+	if (time < self->frames[0]) return; /* Time is before first frame. */
 
 	if (slot->attachmentVerticesCount < self->frameVerticesCount) {
 		if (slot->attachmentVerticesCapacity < self->frameVerticesCount) {

+ 1 - 4
spine-csharp/src/Animation.cs

@@ -571,10 +571,7 @@ namespace Spine {
 			if (slot.attachment != attachment) return;
 
 			float[] frames = this.frames;
-			if (time < frames[0]) {
-				slot.attachmentVerticesCount = 0;
-				return; // Time is before first frame.
-			}
+			if (time < frames[0]) return; // Time is before first frame.
 
 			float[][] frameVertices = this.frameVertices;
 			int vertexCount = frameVertices[0].Length;

+ 1 - 4
spine-js/spine.js

@@ -774,10 +774,7 @@ spine.FfdTimeline.prototype = {
 		if (slot.attachment != attachment) return;
 
 		var frames = this.frames;
-		if (time < frames[0]) {
-			slot.attachmentVertices.length = 0;
-			return; // Time is before first frame.
-		}
+		if (time < frames[0]) return; // Time is before first frame.
 
 		var frameVertices = this.frameVertices;
 		var vertexCount = frameVertices[0].length;