mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 18:35:20 +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
@ -103,14 +103,8 @@ void CharacterController::markerEvent(float time, const std::string &evt)
|
|||||||
// to this actor type
|
// to this actor type
|
||||||
return;
|
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)
|
if(mAnimQueue.size() == 0)
|
||||||
{
|
{
|
||||||
@ -125,7 +119,7 @@ void CharacterController::markerEvent(float time, const std::string &evt)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(evt.compare(ms, evt.length()-ms, "stop") == 0)
|
if(evt == "stop")
|
||||||
{
|
{
|
||||||
if(mAnimQueue.size() == 0)
|
if(mAnimQueue.size() == 0)
|
||||||
{
|
{
|
||||||
|
@ -444,7 +444,13 @@ void loadResource(Ogre::Resource *resource)
|
|||||||
TextKeyMap::const_iterator insiter = keyiter;
|
TextKeyMap::const_iterator insiter = keyiter;
|
||||||
TextKeyMap groupkeys;
|
TextKeyMap groupkeys;
|
||||||
do {
|
do {
|
||||||
groupkeys.insert(std::make_pair(insiter->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);
|
} while(insiter++ != lastkeyiter);
|
||||||
|
|
||||||
bindings.setUserAny(std::string(sTextKeyExtraDataID)+"@"+currentgroup, Ogre::Any(groupkeys));
|
bindings.setUserAny(std::string(sTextKeyExtraDataID)+"@"+currentgroup, Ogre::Any(groupkeys));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user