From 532269c44eb023e94df2ac6d540bb38c95aefafd Mon Sep 17 00:00:00 2001 From: pipu Date: Tue, 13 Jan 2015 11:07:06 +0800 Subject: [PATCH] fix bug: cut inner timeline action as outer timeline action's length --- cocos/editor-support/cocostudio/ActionTimeline/CCFrame.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cocos/editor-support/cocostudio/ActionTimeline/CCFrame.cpp b/cocos/editor-support/cocostudio/ActionTimeline/CCFrame.cpp index 733b774544..25c4d460f3 100644 --- a/cocos/editor-support/cocostudio/ActionTimeline/CCFrame.cpp +++ b/cocos/editor-support/cocostudio/ActionTimeline/CCFrame.cpp @@ -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);