Skip to content

Commit

Permalink
修复部分 GUI 实体渲染导致女仆动画切换异常的问题 (#600)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomatoPuddin authored and TartaricAcid committed Nov 1, 2024
1 parent 573c7e3 commit 85c8996
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,13 @@ public void process(final double tick, AnimationEvent<T> event, ExpressionEvalua
return;
}

boolean resetTick = this.shouldResetTick;
if (this.justStartedTransition && (this.shouldResetTick || this.justStopped)) {
this.justStopped = false;
adjustedTick = adjustTick(tick);
} else if (this.currentAnimation == null && !this.animationQueue.isEmpty()) {
this.shouldResetTick = true;
resetTick = true;
this.animationState = AnimationState.TRANSITIONING;
this.justStartedTransition = true;
this.needsAnimationReload = false;
Expand All @@ -259,7 +261,7 @@ public void process(final double tick, AnimationEvent<T> event, ExpressionEvalua
// 处理过渡到其他动画(或仅开始一个动画)
if (this.animationState == AnimationState.TRANSITIONING) {
// 刚开始过渡,所以将当前动画设置为第一个
if (adjustedTick == 0 || this.isJustStarting) {
if (resetTick || this.isJustStarting) {
this.justStartedTransition = false;
Pair<ILoopType, Animation> current = this.animationQueue.poll();
if (current != null) {
Expand Down

0 comments on commit 85c8996

Please sign in to comment.