diff options
author | Melanie | 2010-03-30 21:34:27 +0100 |
---|---|---|
committer | Melanie | 2010-03-30 21:34:27 +0100 |
commit | 5693870fe26fae35a28f2d5103780434f4f40e57 (patch) | |
tree | 0e070fb6f11ab8763ac4f1f9a851a0061101d4d6 /OpenSim/Region/RegionCombinerModule | |
parent | Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/ca... (diff) | |
parent | minor: commented out code removal (diff) | |
download | opensim-SC-5693870fe26fae35a28f2d5103780434f4f40e57.zip opensim-SC-5693870fe26fae35a28f2d5103780434f4f40e57.tar.gz opensim-SC-5693870fe26fae35a28f2d5103780434f4f40e57.tar.bz2 opensim-SC-5693870fe26fae35a28f2d5103780434f4f40e57.tar.xz |
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/RegionCombinerModule')
-rw-r--r-- | OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs index 0b8771c..b42d3bf 100644 --- a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs +++ b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs | |||
@@ -625,36 +625,37 @@ namespace OpenSim.Region.RegionCombinerModule | |||
625 | return; | 625 | return; |
626 | } | 626 | } |
627 | 627 | ||
628 | List<ScenePresence> avatars = connectiondata.RegionScene.GetAvatars(); | ||
629 | List<Vector3> CoarseLocations = new List<Vector3>(); | 628 | List<Vector3> CoarseLocations = new List<Vector3>(); |
630 | List<UUID> AvatarUUIDs = new List<UUID>(); | 629 | List<UUID> AvatarUUIDs = new List<UUID>(); |
631 | for (int i = 0; i < avatars.Count; i++) | 630 | connectiondata.RegionScene.ForEachScenePresence(delegate(ScenePresence sp) |
632 | { | 631 | { |
633 | if (avatars[i].UUID != presence.UUID) | 632 | if (sp.IsChildAgent) |
633 | return; | ||
634 | if (sp.UUID != presence.UUID) | ||
634 | { | 635 | { |
635 | if (avatars[i].ParentID != 0) | 636 | if (sp.ParentID != 0) |
636 | { | 637 | { |
637 | // sitting avatar | 638 | // sitting avatar |
638 | SceneObjectPart sop = connectiondata.RegionScene.GetSceneObjectPart(avatars[i].ParentID); | 639 | SceneObjectPart sop = connectiondata.RegionScene.GetSceneObjectPart(sp.ParentID); |
639 | if (sop != null) | 640 | if (sop != null) |
640 | { | 641 | { |
641 | CoarseLocations.Add(sop.AbsolutePosition + avatars[i].AbsolutePosition); | 642 | CoarseLocations.Add(sop.AbsolutePosition + sp.AbsolutePosition); |
642 | AvatarUUIDs.Add(avatars[i].UUID); | 643 | AvatarUUIDs.Add(sp.UUID); |
643 | } | 644 | } |
644 | else | 645 | else |
645 | { | 646 | { |
646 | // we can't find the parent.. ! arg! | 647 | // we can't find the parent.. ! arg! |
647 | CoarseLocations.Add(avatars[i].AbsolutePosition); | 648 | CoarseLocations.Add(sp.AbsolutePosition); |
648 | AvatarUUIDs.Add(avatars[i].UUID); | 649 | AvatarUUIDs.Add(sp.UUID); |
649 | } | 650 | } |
650 | } | 651 | } |
651 | else | 652 | else |
652 | { | 653 | { |
653 | CoarseLocations.Add(avatars[i].AbsolutePosition); | 654 | CoarseLocations.Add(sp.AbsolutePosition); |
654 | AvatarUUIDs.Add(avatars[i].UUID); | 655 | AvatarUUIDs.Add(sp.UUID); |
655 | } | 656 | } |
656 | } | 657 | } |
657 | } | 658 | }); |
658 | DistributeCourseLocationUpdates(CoarseLocations, AvatarUUIDs, connectiondata, presence); | 659 | DistributeCourseLocationUpdates(CoarseLocations, AvatarUUIDs, connectiondata, presence); |
659 | } | 660 | } |
660 | 661 | ||