mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 20:05:33 +08:00
refactor: simplify SOP.AttachedAvatar into SOG.AttachedAvatar
This does a tiny bit to reduce code complexity, memory requirement and the cpu time of pointlessly setting this field to the same value in every SOP
This commit is contained in:
@@ -116,14 +116,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
return priority;
|
||||
}
|
||||
|
||||
|
||||
private uint GetPriorityByTime(IClientAPI client, ISceneEntity entity)
|
||||
{
|
||||
// And anything attached to this avatar gets top priority as well
|
||||
if (entity is SceneObjectPart)
|
||||
{
|
||||
SceneObjectPart sop = (SceneObjectPart)entity;
|
||||
if (sop.ParentGroup.RootPart.IsAttachment && client.AgentId == sop.ParentGroup.RootPart.AttachedAvatar)
|
||||
if (sop.ParentGroup.RootPart.IsAttachment && client.AgentId == sop.ParentGroup.AttachedAvatar)
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -136,7 +135,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if (entity is SceneObjectPart)
|
||||
{
|
||||
SceneObjectPart sop = (SceneObjectPart)entity;
|
||||
if (sop.ParentGroup.RootPart.IsAttachment && client.AgentId == sop.ParentGroup.RootPart.AttachedAvatar)
|
||||
if (sop.ParentGroup.RootPart.IsAttachment && client.AgentId == sop.ParentGroup.AttachedAvatar)
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -149,7 +148,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if (entity is SceneObjectPart)
|
||||
{
|
||||
SceneObjectPart sop = (SceneObjectPart)entity;
|
||||
if (sop.ParentGroup.RootPart.IsAttachment && client.AgentId == sop.ParentGroup.RootPart.AttachedAvatar)
|
||||
if (sop.ParentGroup.RootPart.IsAttachment && client.AgentId == sop.ParentGroup.AttachedAvatar)
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user