1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-13 23:09:40 +00:00

Filter events that do not belong to the current group

This commit is contained in:
Chris Robinson 2013-01-17 11:03:58 -08:00
parent da4f17859e
commit 47c157303a

View file

@ -56,7 +56,7 @@ CharacterController::CharacterController(const MWWorld::Ptr &ptr, MWRender::Anim
CharacterController::CharacterController(const CharacterController &rhs) CharacterController::CharacterController(const CharacterController &rhs)
: mPtr(rhs.mPtr), mAnimation(rhs.mAnimation), mAnimNames(rhs.mAnimNames) : mPtr(rhs.mPtr), mAnimation(rhs.mAnimation), mAnimNames(rhs.mAnimNames)
, mState(rhs.mState), mSkipAnim(rhs.mSkipAnim) , mCurrentGroup(rhs.mCurrentGroup), mState(rhs.mState), mSkipAnim(rhs.mSkipAnim)
{ {
if(mAnimNames.size() == 0) if(mAnimNames.size() == 0)
return; return;
@ -79,6 +79,12 @@ void CharacterController::markerEvent(const std::string &evt)
// to this actor type // to this actor type
return; return;
} }
if(evt.length() <= mCurrentGroup.length()+2 || evt.compare(0, mCurrentGroup.length(), mCurrentGroup) != 0 ||
evt.compare(mCurrentGroup.length(), 2, ": ") != 0)
{
std::cerr<< "Event \""<<evt<<"\" does not belong to group \""<<mCurrentGroup<<"\"" <<std::endl;
return;
}
} }