summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-08-12 18:18:15 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-08-12 18:18:15 +0200
commit47d0bdd5584e53e2c77a57972708ea3fcb468ff7 (patch)
treefad415fa894d576573b00bca043e4229228f84db
parentf19e268c7ae928a0b65919453409729062a60822 (diff)
parent81399ae9baebf93dd113dbea12463b0038e38922 (diff)
downloadredot-engine-47d0bdd5584e53e2c77a57972708ea3fcb468ff7.tar.gz
Merge pull request #95405 from TokageItLab/fix-double-seeking
Prevent to seek doubly on AnimationPlayerEditor
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index f64c4532a1..660e4647a1 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -1295,7 +1295,7 @@ void AnimationPlayerEditor::_seek_value_changed(float p_value, bool p_timeline_o
}
pos = CLAMP(pos, 0, (double)anim->get_length() - CMP_EPSILON2); // Hack: Avoid fposmod with LOOP_LINEAR.
- if (!p_timeline_only && anim.is_valid()) {
+ if (!p_timeline_only && anim.is_valid() && (!player->is_valid() || !Math::is_equal_approx(pos, player->get_current_animation_position()))) {
player->seek_internal(pos, true, true, false);
}