summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-10-15 20:16:47 +0200
committerGitHub <noreply@github.com>2017-10-15 20:16:47 +0200
commitc016e13c89d500343e2da1462e013a30327699b5 (patch)
tree1289a492917b7e533e067d8c2f59263d52d07d8a
parent64827d2040098137d25a64804c97686db8febdd0 (diff)
parent2d2467c0ff8ba05f492cefef3adbcd5513bbd8dd (diff)
Merge pull request #12101 from RandomShaper/fix-seek-to-end
Fix animation not stopping after seeking to the end
-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 05963acf56..c4cfce5d72 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -529,12 +529,12 @@ void AnimationPlayer::_animation_process_data(PlaybackData &cd, float p_delta, f
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
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
end_notify = true;
}