mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
[c] Port of commit 9d49999: Changed SequenceTimeline to match AttachmentTimeline behavior.
This commit is contained in:
parent
90f6bfe49e
commit
e327e9beb5
@ -1937,6 +1937,15 @@ void _spSequenceTimeline_apply(spTimeline *timeline, spSkeleton *skeleton, float
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (self->attachment->type == SP_ATTACHMENT_REGION) sequence = ((spRegionAttachment *) self->attachment)->sequence;
|
||||||
|
if (self->attachment->type == SP_ATTACHMENT_MESH) sequence = ((spMeshAttachment *) self->attachment)->sequence;
|
||||||
|
if (!sequence) return;
|
||||||
|
|
||||||
|
if (direction == SP_MIX_DIRECTION_OUT) {
|
||||||
|
if (blend == SP_MIX_BLEND_SETUP) slot->sequenceIndex = -1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
frames = self->super.frames->items;
|
frames = self->super.frames->items;
|
||||||
if (time < frames[0]) { /* Time is before first frame. */
|
if (time < frames[0]) { /* Time is before first frame. */
|
||||||
if (blend == SP_MIX_BLEND_SETUP || blend == SP_MIX_BLEND_FIRST) slot->sequenceIndex = -1;
|
if (blend == SP_MIX_BLEND_SETUP || blend == SP_MIX_BLEND_FIRST) slot->sequenceIndex = -1;
|
||||||
@ -1948,9 +1957,6 @@ void _spSequenceTimeline_apply(spTimeline *timeline, spSkeleton *skeleton, float
|
|||||||
modeAndIndex = (int) frames[i + MODE];
|
modeAndIndex = (int) frames[i + MODE];
|
||||||
delay = frames[i + DELAY];
|
delay = frames[i + DELAY];
|
||||||
|
|
||||||
if (self->attachment->type == SP_ATTACHMENT_REGION) sequence = ((spRegionAttachment *) self->attachment)->sequence;
|
|
||||||
if (self->attachment->type == SP_ATTACHMENT_MESH) sequence = ((spMeshAttachment *) self->attachment)->sequence;
|
|
||||||
if (!sequence) return;
|
|
||||||
index = modeAndIndex >> 4;
|
index = modeAndIndex >> 4;
|
||||||
count = sequence->regions->size;
|
count = sequence->regions->size;
|
||||||
mode = modeAndIndex & 0xf;
|
mode = modeAndIndex & 0xf;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user