Skip to content

Commit

Permalink
Fix animation not stopping after seeking to the end
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomShaper committed Oct 14, 2017
1 parent ba9486a commit 2d2467c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scene/animation/animation_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 2d2467c

Please sign in to comment.