* On deselection of objects, stop every object id passed triggering an update for the entire group
* This was not a problem with objects consisting of less than 30 prims, since the extra schedules would be ignored * However, above approximately 30 prims extra schedules would actually occur. * For instance, a 140 prim object would end up triggering approximately 2500 ObjectUpdates to every avatar in range rather than 140 * Hopefully, this change will improve client responsiveness on deselect and was one of the reasons that the AgentThrottle restriction started causing problems yesterday.0.6.0-stable
parent
ac443559d1
commit
1b7405dca1
|
@ -141,7 +141,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// Handle the deselection of a prim from the client.
|
||||
/// </summary>
|
||||
/// <param name="primLocalID"></param>
|
||||
/// <param name="remoteClient"></param>
|
||||
|
@ -151,35 +151,28 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
if (part == null)
|
||||
return;
|
||||
|
||||
bool isAttachment = false;
|
||||
// The prim is in the process of being deleted.
|
||||
if (null == part.ParentGroup.RootPart)
|
||||
return;
|
||||
|
||||
// If the parent group is null, we are in an inconsistent state
|
||||
// try to recover gracefully by doing all that can be done on
|
||||
// a lone prim
|
||||
//
|
||||
if (part.ParentGroup == null)
|
||||
{
|
||||
if (part.IsAttachment)
|
||||
isAttachment = true;
|
||||
else
|
||||
part.ScheduleFullUpdate();
|
||||
}
|
||||
else
|
||||
{
|
||||
part.ParentGroup.IsSelected = false;
|
||||
// A deselect packet contains all the local prims being deselected. However, since selection is still
|
||||
// group based we only want the root prim to trigger a full update - otherwise on objects with many prims
|
||||
// we end up sending many duplicate ObjectUpdates
|
||||
if (part.ParentGroup.RootPart.LocalId != part.LocalId)
|
||||
return;
|
||||
|
||||
bool isAttachment = false;
|
||||
|
||||
// This is wrong, wrong, wrong. Selection should not be
|
||||
// handled by group, but by prim. Legacy cruft.
|
||||
// TODO: Make selection flagging per prim!
|
||||
//
|
||||
if (part.ParentGroup.RootPart != null)
|
||||
{
|
||||
part.ParentGroup.IsSelected = false;
|
||||
|
||||
if (part.ParentGroup.RootPart.IsAttachment)
|
||||
isAttachment = true;
|
||||
else
|
||||
part.ParentGroup.ScheduleGroupForFullUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
// If it's not an attachment, and we are allowed to move it,
|
||||
// then we might have done so. If we moved across a parcel
|
||||
|
|
Loading…
Reference in New Issue