From 9f5a36b817aae465a3d4b868a22268bc5233e737 Mon Sep 17 00:00:00 2001 From: WenhaiLin Date: Fri, 12 Jun 2015 11:03:32 +0800 Subject: [PATCH] Fixed ParticleSystem may using wrong texture if the particle PLIST file created via ParticleDesigner. --- cocos/2d/CCParticleSystem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cocos/2d/CCParticleSystem.cpp b/cocos/2d/CCParticleSystem.cpp index 4cbd7f6486..170c8231a0 100644 --- a/cocos/2d/CCParticleSystem.cpp +++ b/cocos/2d/CCParticleSystem.cpp @@ -367,7 +367,7 @@ bool ParticleSystem::initWithDictionary(ValueMap& dictionary, const std::string& Texture2D *tex = nullptr; - if (textureName.length() > 0) + if (!textureName.empty()) { // set not pop-up message box when load image failed bool notify = FileUtils::getInstance()->isPopupNotify(); @@ -404,7 +404,7 @@ bool ParticleSystem::initWithDictionary(ValueMap& dictionary, const std::string& CCASSERT(isOK, "CCParticleSystem: error init image with Data"); CC_BREAK_IF(!isOK); - setTexture(Director::getInstance()->getTextureCache()->addImage(image, textureName.c_str())); + setTexture(Director::getInstance()->getTextureCache()->addImage(image, _plistFile + textureName)); image->release(); }