From c7f5c3052d7ee1ccdd9b86a3ce25bf480e56ae13 Mon Sep 17 00:00:00 2001 From: G17hao <670788361@qq.com> Date: Thu, 6 Nov 2014 17:51:19 +0800 Subject: [PATCH] Update CCBone.cpp fix the bone disorderly flying http://www.cocoachina.com/bbs/read.php?tid-220321-keyword-%C2%D2%B7%C9.html --- cocos/editor-support/cocostudio/CCBone.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/cocos/editor-support/cocostudio/CCBone.cpp b/cocos/editor-support/cocostudio/CCBone.cpp index 3c74b6047e..4b217141b5 100644 --- a/cocos/editor-support/cocostudio/CCBone.cpp +++ b/cocos/editor-support/cocostudio/CCBone.cpp @@ -188,21 +188,20 @@ void Bone::update(float delta) if (_boneTransformDirty) { + _worldInfo->copy(_tweenData); if (_dataVersion >= VERSION_COMBINED) { - TransformHelp::nodeConcat(*_tweenData, *_boneData); - _tweenData->scaleX -= 1; - _tweenData->scaleY -= 1; + TransformHelp::nodeConcat(*_worldInfo, *_boneData); + _worldInfo->scaleX -= 1; + _worldInfo->scaleY -= 1; } - _worldInfo->copy(_tweenData); - - _worldInfo->x = _tweenData->x + _position.x; - _worldInfo->y = _tweenData->y + _position.y; - _worldInfo->scaleX = _tweenData->scaleX * _scaleX; - _worldInfo->scaleY = _tweenData->scaleY * _scaleY; - _worldInfo->skewX = _tweenData->skewX + _skewX + CC_DEGREES_TO_RADIANS(_rotationZ_X); - _worldInfo->skewY = _tweenData->skewY + _skewY - CC_DEGREES_TO_RADIANS(_rotationZ_Y); + _worldInfo->x = _worldInfo->x + _position.x; + _worldInfo->y = _worldInfo->y + _position.y; + _worldInfo->scaleX = _worldInfo->scaleX * _scaleX; + _worldInfo->scaleY = _worldInfo->scaleY * _scaleY; + _worldInfo->skewX = _worldInfo->skewX + _skewX + CC_DEGREES_TO_RADIANS(_rotationZ_X); + _worldInfo->skewY = _worldInfo->skewY + _skewY - CC_DEGREES_TO_RADIANS(_rotationZ_Y); if(_parentBone) {