From 6905bd18ba09abc64a3a9b157d9309a36fd34d17 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 21 Jan 2013 02:59:12 -0800 Subject: [PATCH] Filter out the group name from the text keys It's already in the animation name, and the text keys are animation-specific anyway. --- apps/openmw/mwmechanics/character.cpp | 10 ++-------- components/nifogre/ogre_nif_loader.cpp | 8 +++++++- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index ea934a284..bc065d9d6 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -103,14 +103,8 @@ void CharacterController::markerEvent(float time, const std::string &evt) // to this actor type return; } - std::string::size_type ms = mCurrentGroup.length()+2; - if(evt.length() <= ms || evt.compare(0, ms-2, mCurrentGroup) != 0 || evt.compare(ms-2, 2, ": ") != 0) - { - std::cerr<< "Event \""<first - keyiter->first, insiter->second)); + sep = insiter->second.find(':'); + if(sep == currentgroup.length() && insiter->second.compare(0, sep, currentgroup) == 0) + groupkeys.insert(std::make_pair(insiter->first - keyiter->first, + insiter->second.substr(sep+2))); + else if((sep == sizeof("soundgen")-1 && insiter->second.compare(0, sep, "soundgen") == 0) || + (sep == sizeof("sound")-1 && insiter->second.compare(0, sep, "sound") == 0)) + groupkeys.insert(std::make_pair(insiter->first - keyiter->first, insiter->second)); } while(insiter++ != lastkeyiter); bindings.setUserAny(std::string(sTextKeyExtraDataID)+"@"+currentgroup, Ogre::Any(groupkeys));