summaryrefslogtreecommitdiffstats
path: root/scene/animation/animation_player.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-05-29 11:19:45 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-05-29 11:19:45 +0200
commit20ad681da2b5d628992ad2f4d4a336b74a3aa09d (patch)
treef77c3c71dec002a0fa6f1522f0e68cae73f96370 /scene/animation/animation_player.cpp
parent4d906f46b3773aba09652d6b20ceb2d23f803214 (diff)
parent3fde32a67e55ec1ece97f38c41443a342be655e1 (diff)
downloadredot-engine-20ad681da2b5d628992ad2f4d4a336b74a3aa09d.tar.gz
Merge pull request #92126 from TokageItLab/reset-dominant
Fix Deterministic blending with Dominant/Recessive doesn't have initial value even if there is no Discrete track
Diffstat (limited to 'scene/animation/animation_player.cpp')
-rw-r--r--scene/animation/animation_player.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index 435776843c..0c24d79ad7 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -447,10 +447,10 @@ void AnimationPlayer::_play(const StringName &p_name, double p_custom_blend, flo
} else {
if (p_from_end && c.current.pos == 0) {
// Animation reset but played backwards, set position to the end.
- c.current.pos = c.current.from->animation->get_length();
+ seek(c.current.from->animation->get_length(), true, true);
} else if (!p_from_end && c.current.pos == c.current.from->animation->get_length()) {
// Animation resumed but already ended, set position to the beginning.
- c.current.pos = 0;
+ seek(0, true, true);
} else if (playing) {
return;
}