[c] Ported latest AnimationState changes, see c512ee5d595076842cbb12d95a3a7f06792b81d1

This commit is contained in:
badlogic 2016-12-06 13:49:35 +01:00
parent aba6a4b74c
commit e8fa99557e

View File

@ -351,6 +351,7 @@ void spAnimationState_apply (spAnimationState* self, spSkeleton* skeleton) {
} }
} }
_spAnimationState_queueEvents(self, current, animationTime); _spAnimationState_queueEvents(self, current, animationTime);
internal->eventsCount = 0;
current->nextAnimationLast = animationTime; current->nextAnimationLast = animationTime;
current->nextTrackLast = current->trackTime; 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->nextAnimationLast = animationTime;
from->nextTrackLast = from->trackTime; 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. */ if (event->time < animationStart) continue; /* Discard events outside animation start/end. */
_spEventQueue_event(internal->queue, entry, event); _spEventQueue_event(internal->queue, entry, event);
} }
internal->eventsCount = 0;
} }
void spAnimationState_clearTracks (spAnimationState* self) { void spAnimationState_clearTracks (spAnimationState* self) {