mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Fix animation not stopping after seeking to the end
Fixes #10228.
(cherry picked from commit 2d2467c0ff)
This commit is contained in:
parent
fd8a71397d
commit
a0a9363b7a
1 changed files with 2 additions and 2 deletions
|
|
@ -525,12 +525,12 @@ void AnimationPlayer::_animation_process_data(PlaybackData &cd, float p_delta, f
|
||||||
|
|
||||||
if (&cd == &playback.current) {
|
if (&cd == &playback.current) {
|
||||||
|
|
||||||
if (!backwards && cd.pos < len && next_pos == len /*&& playback.blend.empty()*/) {
|
if (!backwards && cd.pos <= len && next_pos == len /*&& playback.blend.empty()*/) {
|
||||||
//playback finished
|
//playback finished
|
||||||
end_notify = true;
|
end_notify = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (backwards && cd.pos > 0 && next_pos == 0 /*&& playback.blend.empty()*/) {
|
if (backwards && cd.pos >= 0 && next_pos == 0 /*&& playback.blend.empty()*/) {
|
||||||
//playback finished
|
//playback finished
|
||||||
end_notify = true;
|
end_notify = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue