aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/RegionCombinerModule
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/RegionCombinerModule')
-rw-r--r--OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs25
1 files changed, 13 insertions, 12 deletions
diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs
index 1a99c83..7a43537 100644
--- a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs
+++ b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs
@@ -707,36 +707,37 @@ namespace OpenSim.Region.RegionCombinerModule
707 return; 707 return;
708 } 708 }
709 709
710 List<ScenePresence> avatars = connectiondata.RegionScene.GetAvatars();
711 List<Vector3> CoarseLocations = new List<Vector3>(); 710 List<Vector3> CoarseLocations = new List<Vector3>();
712 List<UUID> AvatarUUIDs = new List<UUID>(); 711 List<UUID> AvatarUUIDs = new List<UUID>();
713 for (int i = 0; i < avatars.Count; i++) 712 connectiondata.RegionScene.ForEachScenePresence(delegate(ScenePresence sp)
714 { 713 {
715 if (avatars[i].UUID != presence.UUID) 714 if (sp.IsChildAgent)
715 return;
716 if (sp.UUID != presence.UUID)
716 { 717 {
717 if (avatars[i].ParentID != 0) 718 if (sp.ParentID != 0)
718 { 719 {
719 // sitting avatar 720 // sitting avatar
720 SceneObjectPart sop = connectiondata.RegionScene.GetSceneObjectPart(avatars[i].ParentID); 721 SceneObjectPart sop = connectiondata.RegionScene.GetSceneObjectPart(sp.ParentID);
721 if (sop != null) 722 if (sop != null)
722 { 723 {
723 CoarseLocations.Add(sop.AbsolutePosition + avatars[i].AbsolutePosition); 724 CoarseLocations.Add(sop.AbsolutePosition + sp.AbsolutePosition);
724 AvatarUUIDs.Add(avatars[i].UUID); 725 AvatarUUIDs.Add(sp.UUID);
725 } 726 }
726 else 727 else
727 { 728 {
728 // we can't find the parent.. ! arg! 729 // we can't find the parent.. ! arg!
729 CoarseLocations.Add(avatars[i].AbsolutePosition); 730 CoarseLocations.Add(sp.AbsolutePosition);
730 AvatarUUIDs.Add(avatars[i].UUID); 731 AvatarUUIDs.Add(sp.UUID);
731 } 732 }
732 } 733 }
733 else 734 else
734 { 735 {
735 CoarseLocations.Add(avatars[i].AbsolutePosition); 736 CoarseLocations.Add(sp.AbsolutePosition);
736 AvatarUUIDs.Add(avatars[i].UUID); 737 AvatarUUIDs.Add(sp.UUID);
737 } 738 }
738 } 739 }
739 } 740 });
740 DistributeCourseLocationUpdates(CoarseLocations, AvatarUUIDs, connectiondata, presence); 741 DistributeCourseLocationUpdates(CoarseLocations, AvatarUUIDs, connectiondata, presence);
741 } 742 }
742 743