mirror of https://github.com/axmolengine/axmol.git
bug on Repeat when diff bigger than duration
This commit is contained in:
parent
bc31d6b082
commit
927d29f334
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue