From 5b620fbfe19f0a71e382991bf05ceeec4423035c Mon Sep 17 00:00:00 2001 From: Daisuke Hashimoto Date: Thu, 14 Aug 2014 21:10:51 +0900 Subject: [PATCH] use fileName for _actionDic key --- cocos/editor-support/cocostudio/CCActionManagerEx.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cocos/editor-support/cocostudio/CCActionManagerEx.cpp b/cocos/editor-support/cocostudio/CCActionManagerEx.cpp index 76a15e0bba..56a2d3860c 100644 --- a/cocos/editor-support/cocostudio/CCActionManagerEx.cpp +++ b/cocos/editor-support/cocostudio/CCActionManagerEx.cpp @@ -116,7 +116,11 @@ void ActionManagerEx::initWithDictionary(const char* jsonName,const rapidjson::V ActionObject* ActionManagerEx::getActionByName(const char* jsonName,const char* actionName) { - auto iterator = _actionDic.find(jsonName); + std::string path = jsonName; + ssize_t pos = path.find_last_of("/"); + std::string fileName = path.substr(pos+1,path.length()); + CCLOG("find filename == %s",fileName.c_str()); + auto iterator = _actionDic.find(fileName); if (iterator == _actionDic.end()) { return nullptr;