mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-15 11:31:37 +08:00
[c][cpp] Port: Fixed mixing out inherit timelines to the setup pose. See #2590
This commit is contained in:
parent
85a4f71162
commit
e0796bf543
@ -2163,6 +2163,11 @@ void _spInheritTimeline_apply(spTimeline *timeline, spSkeleton *skeleton, float
|
||||
float *frames = self->super.frames->items;
|
||||
if (!bone->active) return;
|
||||
|
||||
if (direction == SP_MIX_DIRECTION_OUT) {
|
||||
if (blend == SP_MIX_BLEND_SETUP) bone->inherit = bone->data->inherit;
|
||||
return;
|
||||
}
|
||||
|
||||
if (time < frames[0]) {
|
||||
if (blend == SP_MIX_BLEND_SETUP || blend == SP_MIX_BLEND_FIRST) bone->inherit = bone->data->inherit;
|
||||
return;
|
||||
|
||||
@ -67,6 +67,11 @@ void InheritTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vect
|
||||
Bone *bone = skeleton.getBones()[_boneIndex];
|
||||
if (!bone->isActive()) return;
|
||||
|
||||
if (direction == MixDirection_Out) {
|
||||
if (blend == MixBlend_Setup) bone->setInherit(bone->_data.getInherit());
|
||||
return;
|
||||
}
|
||||
|
||||
if (time < _frames[0]) {
|
||||
if (blend == MixBlend_Setup || blend == MixBlend_First) bone->_inherit = bone->_data.getInherit();
|
||||
return;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user