diff options
author | Richard Nelson <none@none> | 2010-04-09 14:30:15 -0700 |
---|---|---|
committer | Richard Nelson <none@none> | 2010-04-09 14:30:15 -0700 |
commit | 55ea80076bafcd1baf6a8ccf713267b8c2c24185 (patch) | |
tree | d6f3c4f65a1f479f39d76b217284867c0b40c2d4 /indra/llcharacter | |
parent | 7d78d1ea4064c8912a6509a9e9527347413db3ce (diff) |
EXT-6422 Infinite loop in LLMotionController::activateMotionInstance
reviewed by monroe
Diffstat (limited to 'indra/llcharacter')
-rw-r--r-- | indra/llcharacter/llkeyframemotion.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
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; |