diff --git a/cocos/2d/CCParticleSystem.cpp b/cocos/2d/CCParticleSystem.cpp index 1b7d904a40..aeda75ac68 100644 --- a/cocos/2d/CCParticleSystem.cpp +++ b/cocos/2d/CCParticleSystem.cpp @@ -357,12 +357,9 @@ bool ParticleSystem::initWithDictionary(ValueMap& dictionary, const std::string& textureName = dirname + textureName; } } - else + else if ( dirname.size()>0 && textureName.empty() == false) { - if (dirname.size()>0) - { - textureName = dirname + textureName; - } + textureName = dirname + textureName; } Texture2D *tex = nullptr; diff --git a/cocos/2d/CCTextureCache.h b/cocos/2d/CCTextureCache.h index 800f910352..8d55c93656 100644 --- a/cocos/2d/CCTextureCache.h +++ b/cocos/2d/CCTextureCache.h @@ -106,7 +106,7 @@ public: * If the filename was not previously loaded, it will create a new Texture2D * object and it will return it. It will use the filename as a key. * Otherwise it will return a reference of a previously loaded image. - * Supported image extensions: .png, .bmp, .tiff, .jpeg, .pvr, .gif + * Supported image extensions: .png, .bmp, .tiff, .jpeg, .pvr */ Texture2D* addImage(const std::string &filepath);