aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneGraph.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs23
1 files changed, 21 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index ecc7f40..7eebb99 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -223,8 +223,27 @@ namespace OpenSim.Region.Framework.Scenes
223 if (sp.IsChildAgent) 223 if (sp.IsChildAgent)
224 return; 224 return;
225 225
226 coarseLocations.Add(sp.AbsolutePosition); 226 if (sp.ParentID != 0)
227 avatarUUIDs.Add(sp.UUID); 227 {
228 // sitting avatar
229 SceneObjectPart sop = m_parentScene.GetSceneObjectPart(sp.ParentID);
230 if (sop != null)
231 {
232 coarseLocations.Add(sop.AbsolutePosition + sp.OffsetPosition);
233 avatarUUIDs.Add(sp.UUID);
234 }
235 else
236 {
237 // we can't find the parent.. ! arg!
238 coarseLocations.Add(sp.AbsolutePosition);
239 avatarUUIDs.Add(sp.UUID);
240 }
241 }
242 else
243 {
244 coarseLocations.Add(sp.AbsolutePosition);
245 avatarUUIDs.Add(sp.UUID);
246 }
228 } 247 }
229 } 248 }
230 249