fix bug: cut inner timeline action as outer timeline action's length

This commit is contained in:
pipu 2015-01-13 11:07:06 +08:00
parent eb74647210
commit 532269c44e
1 changed files with 7 additions and 0 deletions

View File

@ -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);