mirror of https://github.com/axmolengine/axmol.git
Fix SpriteBatchNode sort error.
This commit is contained in:
parent
9f32db9154
commit
25bac2f6a9
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue