diff options
author | Silc Renew <tokage.it.lab@gmail.com> | 2022-12-12 06:25:50 +0900 |
---|---|---|
committer | Silc Renew <tokage.it.lab@gmail.com> | 2022-12-12 06:27:26 +0900 |
commit | af7595a9fb9c9c5a612a772ef12ad2778732a1ac (patch) | |
tree | 086b201875a681f9a80001b661a1151e92e9e902 | |
parent | 05097ded0a915cd6c083f15dab08da2bdc0770b8 (diff) |
Fix seeking process order to retrieve key correctly for AnimationTrack
-rw-r--r-- | scene/animation/animation_player.cpp | 4 | ||||
-rw-r--r-- | scene/animation/animation_tree.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp index eca73fbd10..cc6fadd9b2 100644 --- a/scene/animation/animation_player.cpp +++ b/scene/animation/animation_player.cpp @@ -956,8 +956,8 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, double } if (player->is_playing()) { - player->play(anim_name); player->seek(at_anim_pos); + player->play(anim_name); nc->animation_playing = true; playing_caches.insert(nc); } else { @@ -985,8 +985,8 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, double nc->animation_playing = false; } } else { + player->seek(0.0); player->play(anim_name); - player->seek(0.0, true); nc->animation_playing = true; playing_caches.insert(nc); } diff --git a/scene/animation/animation_tree.cpp b/scene/animation/animation_tree.cpp index c2d584b52f..fbc85bd5e1 100644 --- a/scene/animation/animation_tree.cpp +++ b/scene/animation/animation_tree.cpp @@ -1584,8 +1584,8 @@ void AnimationTree::_process_graph(double p_delta) { } if (player2->is_playing() || seeked) { - player2->play(anim_name); player2->seek(at_anim_pos); + player2->play(anim_name); t->playing = true; playing_caches.insert(t); } else { |