mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:53:51 +00:00
Filter out the group name from the text keys
It's already in the animation name, and the text keys are animation-specific anyway.
This commit is contained in:
parent
8e8900e422
commit
6905bd18ba
2 changed files with 9 additions and 9 deletions
|
@ -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 \""<<evt<<"\" does not belong to group \""<<mCurrentGroup<<"\"" <<std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
if(evt.compare(ms, evt.length()-ms, "loop stop") == 0)
|
||||
if(evt == "loop stop")
|
||||
{
|
||||
if(mAnimQueue.size() == 0)
|
||||
{
|
||||
|
@ -125,7 +119,7 @@ void CharacterController::markerEvent(float time, const std::string &evt)
|
|||
return;
|
||||
}
|
||||
|
||||
if(evt.compare(ms, evt.length()-ms, "stop") == 0)
|
||||
if(evt == "stop")
|
||||
{
|
||||
if(mAnimQueue.size() == 0)
|
||||
{
|
||||
|
|
|
@ -444,6 +444,12 @@ void loadResource(Ogre::Resource *resource)
|
|||
TextKeyMap::const_iterator insiter = keyiter;
|
||||
TextKeyMap groupkeys;
|
||||
do {
|
||||
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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue