diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2016-06-26 21:19:58 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2016-06-26 23:45:18 +0200 |
commit | da034f324adebda824db010e1d020df884cb1e81 (patch) | |
tree | 2a6fada82154b16df07de26ef4ff66c020823ace /scene/animation/animation_player.cpp | |
parent | 10f411b47bd46fc28f780be9f70c20228ef4428c (diff) |
Revert "Added toggle for loop interpolation based on adolson's code"
This reverts commits 8884b8f51963553dd1ecc0bc4accf64deb4f645f
bd5c8f2aa086c2cacc704dfef249c124760ab569
and 5cb31f6d5b667a551092b699de6f4786e0bb5b6d.
<reduz> Akien, I understand the need for the second loop mode, but I think
the current UI is pretty confusing. I think this should be changed for an
enum, both there and in the animation.. otherwise we should revert it
[...]
<reduz> alternatively this could be added per track, which I think should
make it a little less confusing
Reopens #959..
Diffstat (limited to 'scene/animation/animation_player.cpp')
-rw-r--r-- | scene/animation/animation_player.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp index dd4fa992ac..30af9b0094 100644 --- a/scene/animation/animation_player.cpp +++ b/scene/animation/animation_player.cpp @@ -540,7 +540,6 @@ void AnimationPlayer::_animation_process_data(PlaybackData &cd,float p_delta,flo float len=cd.from->animation->get_length(); bool loop=cd.from->animation->has_loop(); - bool loop_interpolation=cd.from->animation->has_loop_interpolation(); if (!loop) { @@ -566,21 +565,10 @@ void AnimationPlayer::_animation_process_data(PlaybackData &cd,float p_delta,flo } - } else if (loop_interpolation) { + } else { next_pos=Math::fposmod(next_pos,len); - } else { - - if (next_pos<0 || next_pos>len) { - if (!backwards) - next_pos=0; - else if (backwards) - next_pos=len; - } - // fix delta - not sure if needed here - delta=next_pos-cd.pos; - } cd.pos=next_pos; |