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)
596
596
void RepeatForever::step (float dt)
597
597
{
598
598
_innerAction->step (dt);
599
- if (_innerAction->isDone ())
599
+ // only action interval should prevent jerk, issue #17808
600
+ if (_innerAction->isDone () && _innerAction->getDuration () > 0 )
600
601
{
601
602
float diff = _innerAction->getElapsed () - _innerAction->getDuration ();
602
603
if (diff > _innerAction->getDuration ())
603
604
diff = fmodf (diff, _innerAction->getDuration ());
604
605
_innerAction->startWithTarget (_target);
605
- // to prevent jerk. issue #390, 1247
606
+ // to prevent jerk. cocos2d-iphone issue #390, 1247
606
607
_innerAction->step (0 .0f );
607
608
_innerAction->step (diff);
608
609
}
You can’t perform that action at this time.
0 commit comments