MAINT-6915 - fixed a bug in Reset Skeletons And Animations. For self avatar, this will now be equivalent to reset skeleton + stop animating me.

meow-7.2.2
Brad Payne (Vir Linden) 2016-11-11 10:17:03 -05:00
parent 5fb30e5ad3
commit de487038fc
2 changed files with 13 additions and 2 deletions

View File

@ -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")));

View File

@ -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;