diff --git a/cocos/2d/CCActionInterval.cpp b/cocos/2d/CCActionInterval.cpp index b408512663..69bf25eae0 100644 --- a/cocos/2d/CCActionInterval.cpp +++ b/cocos/2d/CCActionInterval.cpp @@ -528,6 +528,8 @@ void RepeatForever::step(float dt) if (_innerAction->isDone()) { float diff = _innerAction->getElapsed() - _innerAction->getDuration(); + if (diff > _innerAction->getDuration()) + diff = fmodf(diff, _innerAction->getDuration()); _innerAction->startWithTarget(_target); // to prevent jerk. issue #390, 1247 _innerAction->step(0.0f);