* 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>
|
/// <summary>
|
||||||
///
|
/// Handle the deselection of a prim from the client.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="primLocalID"></param>
|
/// <param name="primLocalID"></param>
|
||||||
/// <param name="remoteClient"></param>
|
/// <param name="remoteClient"></param>
|
||||||
|
@ -151,35 +151,28 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
if (part == null)
|
if (part == null)
|
||||||
return;
|
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
|
// A deselect packet contains all the local prims being deselected. However, since selection is still
|
||||||
// try to recover gracefully by doing all that can be done on
|
// group based we only want the root prim to trigger a full update - otherwise on objects with many prims
|
||||||
// a lone prim
|
// we end up sending many duplicate ObjectUpdates
|
||||||
//
|
if (part.ParentGroup.RootPart.LocalId != part.LocalId)
|
||||||
if (part.ParentGroup == null)
|
return;
|
||||||
{
|
|
||||||
if (part.IsAttachment)
|
bool isAttachment = false;
|
||||||
isAttachment = true;
|
|
||||||
else
|
|
||||||
part.ScheduleFullUpdate();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
part.ParentGroup.IsSelected = false;
|
|
||||||
|
|
||||||
// This is wrong, wrong, wrong. Selection should not be
|
// This is wrong, wrong, wrong. Selection should not be
|
||||||
// handled by group, but by prim. Legacy cruft.
|
// handled by group, but by prim. Legacy cruft.
|
||||||
// TODO: Make selection flagging per prim!
|
// TODO: Make selection flagging per prim!
|
||||||
//
|
//
|
||||||
if (part.ParentGroup.RootPart != null)
|
part.ParentGroup.IsSelected = false;
|
||||||
{
|
|
||||||
if (part.ParentGroup.RootPart.IsAttachment)
|
if (part.ParentGroup.RootPart.IsAttachment)
|
||||||
isAttachment = true;
|
isAttachment = true;
|
||||||
else
|
else
|
||||||
part.ParentGroup.ScheduleGroupForFullUpdate();
|
part.ParentGroup.ScheduleGroupForFullUpdate();
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// If it's not an attachment, and we are allowed to move it,
|
// 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
|
// then we might have done so. If we moved across a parcel
|
||||||
|
|
Loading…
Reference in New Issue