Freeze also synchronized avatars when editing an attachment.

On the removal of permYouOwner():

Calling permYouOwner() to determine if an attachment is yours is
not correct: grid gods (and that includes BEFORE requesting admin
status) are marked as owner of everything in their sim.

The reason for that is that otherwise,
  <Melanie_T> if they only had it when actually godding u, the viewer
  would have to have an option to either show the proper menus (it
  doesn't) or allow the sim to refresh the object flags without full
  object updates (it hasn't).
  <Melanie_T> gods often have to act fast, for instance with griefers.
  Having transition to god mode take as long as a full rez just isn't an
  option, apart from the sim load caused by resending all objects.
  <Melanie_T> Then i tried resending only the object that was selected
  but there the arriving object update would close the pie menu.
  So you right-click a prim and the pie menu would close again.

The result has always been that if you are on your own sim, in opensim,
and select an attachment on another avatar, then YOU would freeze, not
the selected avatar. This patch fixes that "opensim related" bug as
well.
This commit is contained in:
Aleric Inglewood
2013-12-29 21:49:05 +01:00
parent b4848f308f
commit 4d2517d163
6 changed files with 69 additions and 18 deletions

View File

@@ -6506,7 +6506,7 @@ void LLSelectMgr::updateSelectionCenter()
mSelectionCenterGlobal.clearVec();
mShowSelection = FALSE;
mSelectionBBox = LLBBox();
mPauseRequest = NULL;
mPauseRequests.clear();
resetAgentHUDZoom();
}
@@ -6516,27 +6516,18 @@ void LLSelectMgr::updateSelectionCenter()
if (mSelectedObjects->mSelectType == SELECT_TYPE_ATTACHMENT && isAgentAvatarValid())
{
// Singu Note: Chalice Yao's pause agent on attachment selection
if (object->permYouOwner())
// Freeze avatars with a selected attachment, and all avatars with synchronized motions, if any.
LLVOAvatar* avatar = object->getAvatar();
// It is possible that 'avatar' is NULL despite this being an attachment because of some race condition.
// In that case just don't freeze the avatar.
if (avatar)
{
mPauseRequest = gAgentAvatarp->requestPause();
}
else if (LLViewerObject* objectp = mSelectedObjects->getPrimaryObject())
{
while (objectp && !objectp->isAvatar())
{
objectp = (LLViewerObject*)objectp->getParent();
}
if (objectp)
{
mPauseRequest = objectp->asAvatar()->requestPause();
}
avatar->pauseAllSyncedCharacters(mPauseRequests);
}
}
else
{
mPauseRequest = NULL;
mPauseRequests.clear();
}
if (mSelectedObjects->mSelectType != SELECT_TYPE_HUD && isAgentAvatarValid())