mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 22:34:53 +08:00
[cpp] Port of commit 8290353. Fix for hold previous on 3+ animations causing dipping. See #1738.
This commit is contained in:
parent
6d833f36d1
commit
0405d239ea
@ -290,8 +290,9 @@ void EventQueue::drain() {
|
||||
|
||||
const int Subsequent = 0;
|
||||
const int First = 1;
|
||||
const int Hold = 2;
|
||||
const int HoldMix = 3;
|
||||
const int HoldSubsequent = 2;
|
||||
const int HoldFirst = 3;
|
||||
const int HoldMix = 4;
|
||||
|
||||
const int Setup = 1;
|
||||
const int Current = 2;
|
||||
@ -836,7 +837,11 @@ float AnimationState::applyMixingFrom(TrackEntry *to, Skeleton &skeleton, MixBle
|
||||
timelineBlend = MixBlend_Setup;
|
||||
alpha = alphaMix;
|
||||
break;
|
||||
case Hold:
|
||||
case HoldSubsequent:
|
||||
timelineBlend = blend;
|
||||
alpha = alphaHold;
|
||||
break;
|
||||
case HoldFirst:
|
||||
timelineBlend = MixBlend_Setup;
|
||||
alpha = alphaHold;
|
||||
break;
|
||||
@ -1007,8 +1012,12 @@ void AnimationState::computeHold(TrackEntry *entry) {
|
||||
if (to != NULL && to->_holdPrevious) {
|
||||
for (size_t i = 0; i < timelinesCount; i++) {
|
||||
int id = timelines[i]->getPropertyId();
|
||||
if (!_propertyIDs.containsKey(id)) _propertyIDs.put(id, true);
|
||||
timelineMode[i] = Hold;
|
||||
if (!_propertyIDs.containsKey(id)) {
|
||||
_propertyIDs.put(id, true);
|
||||
timelineMode[i] = HoldFirst;
|
||||
} else {
|
||||
timelineMode[i] = HoldSubsequent;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -1039,7 +1048,7 @@ void AnimationState::computeHold(TrackEntry *entry) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
timelineMode[i] = Hold;
|
||||
timelineMode[i] = HoldFirst;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user