diff --git a/indra/newview/aoengine.cpp b/indra/newview/aoengine.cpp index f52d69e6ba..c2166b8e06 100644 --- a/indra/newview/aoengine.cpp +++ b/indra/newview/aoengine.cpp @@ -1326,7 +1326,7 @@ void AOEngine::parseNotecard(const char* buffer) continue; } - std::string stateName=line.substr(1,endTag-2); + std::string stateName=line.substr(1,endTag-1); LLStringUtil::trim(stateName); AOSet::AOState* newState=mImportSet->getStateByName(stateName); @@ -1338,7 +1338,7 @@ void AOEngine::parseNotecard(const char* buffer) std::string animationLine=line.substr(endTag+1); std::vector animationList; - LLStringUtil::getTokens(animationLine,animationList,"|"); + LLStringUtil::getTokens(animationLine,animationList,"|,"); for(U32 animIndex=0;animIndex stateNameList; + LLStringUtil::getTokens(stateNames[index],stateNameList,"|"); + + mStates[index].mName=stateNameList[0]; // for quick reference + mStates[index].mAlternateNames=stateNameList; // to get all possible names, including mName mStates[index].mRemapID=stateUUIDs[index]; mStates[index].mInventoryUUID=LLUUID::null; mStates[index].mCurrentAnimation=0; @@ -111,7 +116,7 @@ AOSet::AOSet(const LLUUID inventoryID) mStates[index].mRandom=FALSE; mStates[index].mCycleTime=0.0f; mStates[index].mDirty=FALSE; - mStateNames.push_back(stateNames[index]); + mStateNames.push_back(stateNameList[0]); } stopTimer(); } @@ -130,9 +135,13 @@ AOSet::AOState* AOSet::getStateByName(const std::string name) { for(S32 index=0;indexmAlternateNames.size();names++) { - return &mStates[index]; + if(state->mAlternateNames[names].compare(name)==0) + { + return state; + } } } return NULL; diff --git a/indra/newview/aoset.h b/indra/newview/aoset.h index 5580309435..d6998283b1 100644 --- a/indra/newview/aoset.h +++ b/indra/newview/aoset.h @@ -77,6 +77,7 @@ class AOSet struct AOState { std::string mName; + std::vector mAlternateNames; LLUUID mRemapID; BOOL mCycle; BOOL mRandom;