Skip to content

Commit 0015e7e

Browse files
authored
Update spine 4.2 runtime to 4.2.80. (#18683)
1 parent fce05ec commit 0015e7e

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

native/cocos/editor-support/spine/4.2/spine/AnimationState.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -794,18 +794,16 @@ bool AnimationState::updateMixingFrom(TrackEntry *to, float delta) {
794794
from->_animationLast = from->_nextAnimationLast;
795795
from->_trackLast = from->_nextTrackLast;
796796

797-
if (to->_nextTrackLast != -1) { // The from entry was applied at least once.
798-
bool discard = to->_mixTime == 0 && from->_mixTime == 0;// Discard the from entry when neither have advanced yet.
799-
if (to->_mixTime >= to->_mixDuration || discard) {
797+
// The from entry was applied at least once and the mix is complete.
798+
if (to->_nextTrackLast != -1 && to->_mixTime >= to->_mixDuration) {
800799
// Require totalAlpha == 0 to ensure mixing is complete or the transition is a single frame or discarded.
801-
if (from->_totalAlpha == 0 || to->_mixDuration == 0 || discard) {
800+
if (from->_totalAlpha == 0 || to->_mixDuration == 0) {
802801
to->_mixingFrom = from->_mixingFrom;
803802
if (from->_mixingFrom) from->_mixingFrom->_mixingTo = to;
804803
to->_interruptAlpha = from->_interruptAlpha;
805804
_queue->end(from);
806805
}
807806
return finished;
808-
}
809807
}
810808

811809
from->_trackTime += delta * from->_timeScale;

native/cocos/editor-support/spine/4.2/spine/BlockAllocator.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ namespace spine {
7777
}
7878

7979
void compress() {
80-
if (blocks.size() == 1) return;
80+
if (blocks.size() == 1) {
81+
blocks[0].allocated = 0;
82+
return;
83+
}
8184
int totalSize = 0;
8285
for (int i = 0, n = (int)blocks.size(); i < n; i++) {
8386
totalSize += blocks[i].size;

native/cocos/editor-support/spine/4.2/spine/Skeleton.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,7 @@ void Skeleton::getBounds(float &outX, float &outY, float &outWidth,
507507
} else if (attachment != NULL &&
508508
attachment->getRTTI().instanceOf(ClippingAttachment::rtti) && clipper != NULL) {
509509
clipper->clipStart(*slot, static_cast<ClippingAttachment *>(attachment));
510+
continue;
510511
}
511512

512513
if (verticesLength > 0) {
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Spine 3.8: https://github.com/EsotericSoftware/spine-runtimes/commit/d33c10f85634d01efbe4a3ab31dabaeaca41230c
2+
Spine 4.2: 4.2.80 https://github.com/EsotericSoftware/spine-runtimes/commit/6654484a33e622f62170b6e67f1d09bdca325351

native/external-config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"type": "github",
44
"owner": "cocos",
55
"name": "cocos-engine-external",
6-
"checkout": "v3.8.7-11"
6+
"checkout": "v3.8.7-12"
77
}
88
}

0 commit comments

Comments
 (0)