aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs53
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs2
2 files changed, 6 insertions, 49 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index dcbaeb7..6029221 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -127,7 +127,6 @@ namespace OpenSim.Region.Framework.Scenes
127 private long m_maxPersistTime = 0; 127 private long m_maxPersistTime = 0;
128 private long m_minPersistTime = 0; 128 private long m_minPersistTime = 0;
129// private Random m_rand; 129// private Random m_rand;
130 private List<ScenePresence> m_linkedAvatars = new List<ScenePresence>();
131 130
132 /// <summary> 131 /// <summary>
133 /// This indicates whether the object has changed such that it needs to be repersisted to permenant storage 132 /// This indicates whether the object has changed such that it needs to be repersisted to permenant storage
@@ -600,7 +599,7 @@ namespace OpenSim.Region.Framework.Scenes
600 part.GroupPosition = val; 599 part.GroupPosition = val;
601 } 600 }
602 601
603 foreach (ScenePresence av in m_linkedAvatars) 602 foreach (ScenePresence av in m_sittingAvatars)
604 { 603 {
605 av.sitSOGmoved(); 604 av.sitSOGmoved();
606 } 605 }
@@ -670,7 +669,7 @@ namespace OpenSim.Region.Framework.Scenes
670 if (destination == null) 669 if (destination == null)
671 return sog; 670 return sog;
672 671
673 if (sog.m_linkedAvatars.Count == 0) 672 if (sog.m_sittingAvatars.Count == 0)
674 { 673 {
675 entityTransfer.CrossPrimGroupIntoNewRegion(destination, newpos, sog, true, true); 674 entityTransfer.CrossPrimGroupIntoNewRegion(destination, newpos, sog, true, true);
676 return sog; 675 return sog;
@@ -679,7 +678,7 @@ namespace OpenSim.Region.Framework.Scenes
679 string reason = String.Empty; 678 string reason = String.Empty;
680 string version = String.Empty; 679 string version = String.Empty;
681 680
682 foreach (ScenePresence av in sog.m_linkedAvatars) 681 foreach (ScenePresence av in sog.m_sittingAvatars)
683 { 682 {
684 // We need to cross these agents. First, let's find 683 // We need to cross these agents. First, let's find
685 // out if any of them can't cross for some reason. 684 // out if any of them can't cross for some reason.
@@ -701,7 +700,7 @@ namespace OpenSim.Region.Framework.Scenes
701 700
702 List<avtocrossInfo> avsToCross = new List<avtocrossInfo>(); 701 List<avtocrossInfo> avsToCross = new List<avtocrossInfo>();
703 702
704 foreach (ScenePresence av in sog.m_linkedAvatars) 703 foreach (ScenePresence av in sog.m_sittingAvatars)
705 { 704 {
706 avtocrossInfo avinfo = new avtocrossInfo(); 705 avtocrossInfo avinfo = new avtocrossInfo();
707 SceneObjectPart parentPart = sogScene.GetSceneObjectPart(av.ParentID); 706 SceneObjectPart parentPart = sogScene.GetSceneObjectPart(av.ParentID);
@@ -796,7 +795,7 @@ namespace OpenSim.Region.Framework.Scenes
796 part.GroupPosition = oldp; 795 part.GroupPosition = oldp;
797 } 796 }
798 797
799 foreach (ScenePresence av in sog.m_linkedAvatars) 798 foreach (ScenePresence av in sog.m_sittingAvatars)
800 { 799 {
801 av.sitSOGmoved(); 800 av.sitSOGmoved();
802 } 801 }
@@ -1698,47 +1697,6 @@ namespace OpenSim.Region.Framework.Scenes
1698 } 1697 }
1699 1698
1700 /// <summary> 1699 /// <summary>
1701 /// Add the avatar to this linkset (avatar is sat).
1702 /// </summary>
1703 /// <param name="agentID"></param>
1704 public void AddAvatar(UUID agentID)
1705 {
1706 ScenePresence presence;
1707 if (m_scene.TryGetScenePresence(agentID, out presence))
1708 {
1709 if (!m_linkedAvatars.Contains(presence))
1710 {
1711 m_linkedAvatars.Add(presence);
1712 }
1713 }
1714 }
1715
1716 /// <summary>
1717 /// Delete the avatar from this linkset (avatar is unsat).
1718 /// </summary>
1719 /// <param name="agentID"></param>
1720 public void DeleteAvatar(UUID agentID)
1721 {
1722 ScenePresence presence;
1723 if (m_scene.TryGetScenePresence(agentID, out presence))
1724 {
1725 if (m_linkedAvatars.Contains(presence))
1726 {
1727 m_linkedAvatars.Remove(presence);
1728 }
1729 }
1730 }
1731
1732 /// <summary>
1733 /// Returns the list of linked presences (avatars sat on this group)
1734 /// </summary>
1735 /// <param name="agentID"></param>
1736 public List<ScenePresence> GetLinkedAvatars()
1737 {
1738 return m_linkedAvatars;
1739 }
1740
1741 /// <summary>
1742 /// Attach this scene object to the given avatar. 1700 /// Attach this scene object to the given avatar.
1743 /// </summary> 1701 /// </summary>
1744 /// <param name="agentID"></param> 1702 /// <param name="agentID"></param>
@@ -2347,7 +2305,6 @@ namespace OpenSim.Region.Framework.Scenes
2347 dupe.inTransit = inTransit; // this shouldn't be needed TEST 2305 dupe.inTransit = inTransit; // this shouldn't be needed TEST
2348 2306
2349 // new group as no sitting avatars 2307 // new group as no sitting avatars
2350 dupe.m_linkedAvatars = new List<ScenePresence>();
2351 dupe.m_sittingAvatars = new List<ScenePresence>(); 2308 dupe.m_sittingAvatars = new List<ScenePresence>();
2352 2309
2353 dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed); 2310 dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed);
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index abac3c0..43d522a 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -878,7 +878,7 @@ namespace OpenSim.Region.Framework.Scenes
878 878
879 if (!m_parentGroup.m_dupeInProgress) 879 if (!m_parentGroup.m_dupeInProgress)
880 { 880 {
881 List<ScenePresence> avs = ParentGroup.GetLinkedAvatars(); 881 List<ScenePresence> avs = ParentGroup.GetSittingAvatars();
882 foreach (ScenePresence av in avs) 882 foreach (ScenePresence av in avs)
883 { 883 {
884 if (av.ParentID == m_localId) 884 if (av.ParentID == m_localId)