diff --git a/indra/newview/ao.cpp b/indra/newview/ao.cpp index 930c33dfef..f0fb99875f 100644 --- a/indra/newview/ao.cpp +++ b/indra/newview/ao.cpp @@ -798,6 +798,12 @@ void FloaterAO::onDoubleClick() return; } + // do nothing if animation is for a different state than the active state + if (mSelectedState != AOEngine::instance().getCurrentState()) + { + return; + } + // activate AO set if necessary if (AOEngine::instance().getCurrentSet() != mSelectedSet) { diff --git a/indra/newview/aoengine.cpp b/indra/newview/aoengine.cpp index f30383d483..33f91d556a 100644 --- a/indra/newview/aoengine.cpp +++ b/indra/newview/aoengine.cpp @@ -1063,6 +1063,10 @@ const AOSet* AOEngine::getCurrentSet() const { return mCurrentSet; } +const AOSet::AOState* AOEngine::getCurrentState() const +{ + return mCurrentSet->getStateByRemapID(mLastMotion); +} // void AOEngine::updateSortOrder(AOSet::AOState* state) diff --git a/indra/newview/aoengine.h b/indra/newview/aoengine.h index 184cb6c25d..438fe217b9 100644 --- a/indra/newview/aoengine.h +++ b/indra/newview/aoengine.h @@ -126,6 +126,7 @@ class AOEngine // Double click on animation in AO void playAnimation(const LLUUID& animation); const AOSet* getCurrentSet() const; + const AOSet::AOState* getCurrentState() const; // void inMouselook(bool mouselook);