summaryrefslogtreecommitdiff
path: root/indra/llcharacter/llkeyframemotion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcharacter/llkeyframemotion.cpp')
-rw-r--r--indra/llcharacter/llkeyframemotion.cpp7
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;