aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Prioritizer.cs7
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs12
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs5
3 files changed, 14 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Prioritizer.cs b/OpenSim/Region/Framework/Scenes/Prioritizer.cs
index 4595a29..2a76755 100644
--- a/OpenSim/Region/Framework/Scenes/Prioritizer.cs
+++ b/OpenSim/Region/Framework/Scenes/Prioritizer.cs
@@ -116,14 +116,13 @@ namespace OpenSim.Region.Framework.Scenes
116 return priority; 116 return priority;
117 } 117 }
118 118
119
120 private uint GetPriorityByTime(IClientAPI client, ISceneEntity entity) 119 private uint GetPriorityByTime(IClientAPI client, ISceneEntity entity)
121 { 120 {
122 // And anything attached to this avatar gets top priority as well 121 // And anything attached to this avatar gets top priority as well
123 if (entity is SceneObjectPart) 122 if (entity is SceneObjectPart)
124 { 123 {
125 SceneObjectPart sop = (SceneObjectPart)entity; 124 SceneObjectPart sop = (SceneObjectPart)entity;
126 if (sop.ParentGroup.RootPart.IsAttachment && client.AgentId == sop.ParentGroup.RootPart.AttachedAvatar) 125 if (sop.ParentGroup.RootPart.IsAttachment && client.AgentId == sop.ParentGroup.AttachedAvatar)
127 return 1; 126 return 1;
128 } 127 }
129 128
@@ -136,7 +135,7 @@ namespace OpenSim.Region.Framework.Scenes
136 if (entity is SceneObjectPart) 135 if (entity is SceneObjectPart)
137 { 136 {
138 SceneObjectPart sop = (SceneObjectPart)entity; 137 SceneObjectPart sop = (SceneObjectPart)entity;
139 if (sop.ParentGroup.RootPart.IsAttachment && client.AgentId == sop.ParentGroup.RootPart.AttachedAvatar) 138 if (sop.ParentGroup.RootPart.IsAttachment && client.AgentId == sop.ParentGroup.AttachedAvatar)
140 return 1; 139 return 1;
141 } 140 }
142 141
@@ -149,7 +148,7 @@ namespace OpenSim.Region.Framework.Scenes
149 if (entity is SceneObjectPart) 148 if (entity is SceneObjectPart)
150 { 149 {
151 SceneObjectPart sop = (SceneObjectPart)entity; 150 SceneObjectPart sop = (SceneObjectPart)entity;
152 if (sop.ParentGroup.RootPart.IsAttachment && client.AgentId == sop.ParentGroup.RootPart.AttachedAvatar) 151 if (sop.ParentGroup.RootPart.IsAttachment && client.AgentId == sop.ParentGroup.AttachedAvatar)
153 return 1; 152 return 1;
154 } 153 }
155 154
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index e3b8fc8..fada688 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -169,6 +169,14 @@ namespace OpenSim.Region.Framework.Scenes
169 } 169 }
170 170
171 /// <summary> 171 /// <summary>
172 /// The avatar to which this scene object is attached.
173 /// </summary>
174 /// <remarks>
175 /// If we're not attached to an avatar then this is UUID.Zero
176 /// </remarks>
177 public UUID AttachedAvatar { get; set; }
178
179 /// <summary>
172 /// Is this scene object phantom? 180 /// Is this scene object phantom?
173 /// </summary> 181 /// </summary>
174 /// <remarks> 182 /// <remarks>
@@ -1540,7 +1548,7 @@ namespace OpenSim.Region.Framework.Scenes
1540 { 1548 {
1541 if (IsAttachment) 1549 if (IsAttachment)
1542 { 1550 {
1543 ScenePresence avatar = m_scene.GetScenePresence(rootpart.AttachedAvatar); 1551 ScenePresence avatar = m_scene.GetScenePresence(AttachedAvatar);
1544 if (avatar != null) 1552 if (avatar != null)
1545 { 1553 {
1546 avatar.PushForce(impulse); 1554 avatar.PushForce(impulse);
@@ -1622,7 +1630,7 @@ namespace OpenSim.Region.Framework.Scenes
1622 { 1630 {
1623 if (IsAttachment) 1631 if (IsAttachment)
1624 { 1632 {
1625 ScenePresence avatar = m_scene.GetScenePresence(rootpart.AttachedAvatar); 1633 ScenePresence avatar = m_scene.GetScenePresence(AttachedAvatar);
1626 if (avatar != null) 1634 if (avatar != null)
1627 { 1635 {
1628 avatar.MoveToTarget(target, false); 1636 avatar.MoveToTarget(target, false);
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index a0e87d0..e510611 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -221,9 +221,6 @@ namespace OpenSim.Region.Framework.Scenes
221 public scriptEvents AggregateScriptEvents; 221 public scriptEvents AggregateScriptEvents;
222 222
223 223
224 public UUID AttachedAvatar;
225
226
227 public Vector3 AttachedPos; 224 public Vector3 AttachedPos;
228 225
229 226
@@ -728,7 +725,7 @@ namespace OpenSim.Region.Framework.Scenes
728 725
729 if (IsAttachment) 726 if (IsAttachment)
730 { 727 {
731 ScenePresence sp = m_parentGroup.Scene.GetScenePresence(AttachedAvatar); 728 ScenePresence sp = m_parentGroup.Scene.GetScenePresence(ParentGroup.AttachedAvatar);
732 if (sp != null) 729 if (sp != null)
733 return sp.AbsolutePosition; 730 return sp.AbsolutePosition;
734 } 731 }