mirror of https://github.com/axmolengine/axmol.git
fix bug: cut inner timeline action as outer timeline action's length
This commit is contained in:
parent
eb74647210
commit
532269c44e
|
@ -508,6 +508,13 @@ void InnerActionFrame::onEnter(Frame *nextFrame, int currentFrameIndex)
|
|||
}
|
||||
}
|
||||
|
||||
int duration = _timeline->getActionTimeline()->getDuration();
|
||||
int odddiff = duration - _frameIndex - end + start;
|
||||
if (odddiff < 0)
|
||||
{
|
||||
end += odddiff;
|
||||
}
|
||||
|
||||
if (InnerActionType::NoLoopAction == _innerActionType)
|
||||
{
|
||||
actiontimeline->gotoFrameAndPlay(start, end, false);
|
||||
|
|
Loading…
Reference in New Issue