From e8fa99557ede7fc1fbb3940cea8163b11b63423d Mon Sep 17 00:00:00 2001 From: badlogic Date: Tue, 6 Dec 2016 13:49:35 +0100 Subject: [PATCH] [c] Ported latest AnimationState changes, see c512ee5d595076842cbb12d95a3a7f06792b81d1 --- spine-c/spine-c/src/spine/AnimationState.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spine-c/spine-c/src/spine/AnimationState.c b/spine-c/spine-c/src/spine/AnimationState.c index d5a9d72e1..578fe718f 100644 --- a/spine-c/spine-c/src/spine/AnimationState.c +++ b/spine-c/spine-c/src/spine/AnimationState.c @@ -351,6 +351,7 @@ void spAnimationState_apply (spAnimationState* self, spSkeleton* skeleton) { } } _spAnimationState_queueEvents(self, current, animationTime); + internal->eventsCount = 0; current->nextAnimationLast = animationTime; current->nextTrackLast = current->trackTime; } @@ -414,7 +415,8 @@ float _spAnimationState_applyMixingFrom (spAnimationState* self, spTrackEntry* e } } - _spAnimationState_queueEvents(self, from, animationTime); + if (entry->mixDuration > 0) _spAnimationState_queueEvents(self, from, animationTime); + internal->eventsCount = 0; from->nextAnimationLast = animationTime; from->nextTrackLast = from->trackTime; @@ -528,7 +530,6 @@ void _spAnimationState_queueEvents (spAnimationState* self, spTrackEntry* entry, if (event->time < animationStart) continue; /* Discard events outside animation start/end. */ _spEventQueue_event(internal->queue, entry, event); } - internal->eventsCount = 0; } void spAnimationState_clearTracks (spAnimationState* self) {