From e2bb1d49e51e740ddbd165a4af3cbcd665067c97 Mon Sep 17 00:00:00 2001 From: minggo Date: Tue, 6 Sep 2011 14:01:08 +0800 Subject: [PATCH] fixed #686: set z tag of appended tile --- cocos2dx/tileMap_parallax_nodes/CCTMXLayer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cocos2dx/tileMap_parallax_nodes/CCTMXLayer.cpp b/cocos2dx/tileMap_parallax_nodes/CCTMXLayer.cpp index 0e0ff8a6fa..1d6d2e0e27 100644 --- a/cocos2dx/tileMap_parallax_nodes/CCTMXLayer.cpp +++ b/cocos2dx/tileMap_parallax_nodes/CCTMXLayer.cpp @@ -381,6 +381,10 @@ namespace cocos2d { // append should be after addQuadFromSprite since it modifies the quantity values ccCArrayInsertValueAtIndex(m_pAtlasIndexArray, (void*)z, indexForZ); + // set z tag + addSpriteWithoutQuad(m_pReusedTile, indexForZ, z); + m_pReusedTile->release(); + return m_pReusedTile; }