File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -596,13 +596,14 @@ void RepeatForever::startWithTarget(Node* target)
596596void RepeatForever::step (float dt)
597597{
598598 _innerAction->step (dt);
599- if (_innerAction->isDone ())
599+ // only action interval should prevent jerk, issue #17808
600+ if (_innerAction->isDone () && _innerAction->getDuration () > 0 )
600601 {
601602 float diff = _innerAction->getElapsed () - _innerAction->getDuration ();
602603 if (diff > _innerAction->getDuration ())
603604 diff = fmodf (diff, _innerAction->getDuration ());
604605 _innerAction->startWithTarget (_target);
605- // to prevent jerk. issue #390, 1247
606+ // to prevent jerk. cocos2d-iphone issue #390, 1247
606607 _innerAction->step (0 .0f );
607608 _innerAction->step (diff);
608609 }
You can’t perform that action at this time.
0 commit comments