From de487038fc034c470a21e9d6c5bf78e5085ae4a2 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 11 Nov 2016 10:17:03 -0500 Subject: MAINT-6915 - fixed a bug in Reset Skeletons And Animations. For self avatar, this will now be equivalent to reset skeleton + stop animating me. --- indra/newview/llviewermenu.cpp | 2 +- indra/newview/llvoavatar.cpp | 13 ++++++++++++- 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; -- cgit v1.2.3