fix ReEntry a same frame when scale action's speed.

This commit is contained in:
geron-cn 2015-09-16 15:44:43 +08:00
parent 0479cca364
commit e6fb2f8924
1 changed files with 4 additions and 2 deletions

View File

@ -197,10 +197,12 @@ void ActionTimeline::step(float delta)
{ {
return; return;
} }
_time += delta * _timeSpeed; _time += delta * _timeSpeed;
const float endtoffset = _time - _endFrame * _frameInternal; float deltaCurrFrameTime = abs(_time - _currentFrame * _frameInternal);
if (deltaCurrFrameTime < _frameInternal)
return;
const float endtoffset = _time - _endFrame * _frameInternal;
if (endtoffset < _frameInternal) if (endtoffset < _frameInternal)
{ {
_currentFrame = (int)(_time / _frameInternal); _currentFrame = (int)(_time / _frameInternal);