Merge pull request #95405 from TokageItLab/fix-double-seeking

Prevent to seek doubly on AnimationPlayerEditor
This commit is contained in:
Rémi Verschelde 2024-08-12 18:18:15 +02:00
commit 47d0bdd558
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 1 additions and 1 deletions

View File

@ -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. 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); player->seek_internal(pos, true, true, false);
} }