From 55ea80076bafcd1baf6a8ccf713267b8c2c24185 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Fri, 9 Apr 2010 14:30:15 -0700 Subject: EXT-6422 Infinite loop in LLMotionController::activateMotionInstance reviewed by monroe --- indra/llcharacter/llkeyframemotion.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/llcharacter/llkeyframemotion.cpp') diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp index 5a2e3f73f9..f4dc3b927b 100644 --- a/indra/llcharacter/llkeyframemotion.cpp +++ b/indra/llcharacter/llkeyframemotion.cpp @@ -658,7 +658,12 @@ BOOL LLKeyframeMotion::onActivate() // If the keyframe anim has an associated emote, trigger it. if( mJointMotionList->mEmoteName.length() > 0 ) { - mCharacter->startMotion( gAnimLibrary.stringToAnimState(mJointMotionList->mEmoteName) ); + LLUUID emote_anim_id = gAnimLibrary.stringToAnimState(mJointMotionList->mEmoteName); + // don't start emote if already active to avoid recursion + if (!mCharacter->isMotionActive(emote_anim_id)) + { + mCharacter->startMotion( emote_anim_id ); + } } mLastLoopedTime = 0.f; -- cgit v1.2.3