From 25bac2f6a9c23af45d351c38ac1299d19cdf01ee Mon Sep 17 00:00:00 2001 From: Jacky Date: Tue, 30 Jun 2015 14:12:18 +0800 Subject: [PATCH] Fix SpriteBatchNode sort error. --- cocos/2d/CCSpriteBatchNode.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cocos/2d/CCSpriteBatchNode.cpp b/cocos/2d/CCSpriteBatchNode.cpp index d1f5a90c0b..6b2797b626 100644 --- a/cocos/2d/CCSpriteBatchNode.cpp +++ b/cocos/2d/CCSpriteBatchNode.cpp @@ -280,7 +280,6 @@ void SpriteBatchNode::updateAtlasIndex(Sprite* sprite, ssize_t* curIndex) { oldIndex = sprite->getAtlasIndex(); sprite->setAtlasIndex(*curIndex); - sprite->setOrderOfArrival(0); if (oldIndex != *curIndex){ swap(oldIndex, *curIndex); } @@ -295,7 +294,6 @@ void SpriteBatchNode::updateAtlasIndex(Sprite* sprite, ssize_t* curIndex) //all children are in front of the parent oldIndex = sprite->getAtlasIndex(); sprite->setAtlasIndex(*curIndex); - sprite->setOrderOfArrival(0); if (oldIndex != *curIndex) { swap(oldIndex, *curIndex); @@ -311,7 +309,6 @@ void SpriteBatchNode::updateAtlasIndex(Sprite* sprite, ssize_t* curIndex) { oldIndex = sprite->getAtlasIndex(); sprite->setAtlasIndex(*curIndex); - sprite->setOrderOfArrival(0); if (oldIndex != *curIndex) { this->swap(oldIndex, *curIndex); } @@ -326,7 +323,6 @@ void SpriteBatchNode::updateAtlasIndex(Sprite* sprite, ssize_t* curIndex) {//all children have a zOrder < 0) oldIndex = sprite->getAtlasIndex(); sprite->setAtlasIndex(*curIndex); - sprite->setOrderOfArrival(0); if (oldIndex != *curIndex) { swap(oldIndex, *curIndex); }