summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2016-11-11 10:17:03 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2016-11-11 10:17:03 -0500
commitde487038fc034c470a21e9d6c5bf78e5085ae4a2 (patch)
tree771d1658018d60b8cf22677a1de52addd040997e
parent5fb30e5ad3615c0b0e9e67a94542dbb110e9ed95 (diff)
MAINT-6915 - fixed a bug in Reset Skeletons And Animations. For self avatar, this will now be equivalent to reset skeleton + stop animating me.
-rw-r--r--indra/newview/llviewermenu.cpp2
-rw-r--r--indra/newview/llvoavatar.cpp13
2 files changed, 13 insertions, 2 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index e5ba1ecb97..09bc5a9f75 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -9015,7 +9015,7 @@ void initialize_menus()
view_listener_t::addMenu(new LLAvatarReportAbuse(), "Avatar.ReportAbuse");
view_listener_t::addMenu(new LLAvatarToggleMyProfile(), "Avatar.ToggleMyProfile");
view_listener_t::addMenu(new LLAvatarResetSkeleton(), "Avatar.ResetSkeleton");
- view_listener_t::addMenu(new LLAvatarResetSkeleton(), "Avatar.ResetSkeletonAndAnimations");
+ view_listener_t::addMenu(new LLAvatarResetSkeletonAndAnimations(), "Avatar.ResetSkeletonAndAnimations");
enable.add("Avatar.IsMyProfileOpen", boost::bind(&my_profile_visible));
commit.add("Avatar.OpenMarketplace", boost::bind(&LLWeb::loadURLExternal, gSavedSettings.getString("MarketplaceURL")));
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 77a526f518..b25ced4b7e 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -1914,7 +1914,18 @@ void LLVOAvatar::resetSkeleton(bool reset_animations)
// Animations
if (reset_animations)
{
- resetAnimations();
+ if (isSelf())
+ {
+ // This is equivalent to "Stop Animating Me". Will reset
+ // all animations and propagate the changes to other
+ // viewers.
+ gAgent.stopCurrentAnimations();
+ }
+ else
+ {
+ // Local viewer-side reset for non-self avatars.
+ resetAnimations();
+ }
}
LL_DEBUGS("Avatar") << avString() << " reset ends" << LL_ENDL;