From da034f324adebda824db010e1d020df884cb1e81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sun, 26 Jun 2016 21:19:58 +0200 Subject: Revert "Added toggle for loop interpolation based on adolson's code" This reverts commits 8884b8f51963553dd1ecc0bc4accf64deb4f645f bd5c8f2aa086c2cacc704dfef249c124760ab569 and 5cb31f6d5b667a551092b699de6f4786e0bb5b6d. 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 [...] alternatively this could be added per track, which I think should make it a little less confusing Reopens #959.. --- scene/animation/animation_player.cpp | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'scene/animation/animation_player.cpp') 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; -- cgit v1.2.3