aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs56
1 files changed, 54 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index c7d21bb..3e92954 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -110,8 +110,8 @@ namespace OpenSim.Region.Framework.Scenes
110 private long m_minPersistTime = 0; 110 private long m_minPersistTime = 0;
111 private Random m_rand; 111 private Random m_rand;
112 private bool m_suspendUpdates; 112 private bool m_suspendUpdates;
113 113 private System.Threading.ReaderWriterLockSlim m_partsLock = new System.Threading.ReaderWriterLockSlim();
114 private System.Threading.ReaderWriterLockSlim m_partsLock = new System.Threading.ReaderWriterLockSlim(); 114 private List<ScenePresence> m_linkedAvatars = new List<ScenePresence>();
115 115
116 public bool areUpdatesSuspended 116 public bool areUpdatesSuspended
117 { 117 {
@@ -1116,6 +1116,47 @@ namespace OpenSim.Region.Framework.Scenes
1116 } 1116 }
1117 1117
1118 /// <summary> 1118 /// <summary>
1119 /// Add the avatar to this linkset (avatar is sat).
1120 /// </summary>
1121 /// <param name="agentID"></param>
1122 public void AddAvatar(UUID agentID)
1123 {
1124 ScenePresence presence;
1125 if (m_scene.TryGetScenePresence(agentID, out presence))
1126 {
1127 if (!m_linkedAvatars.Contains(presence))
1128 {
1129 m_linkedAvatars.Add(presence);
1130 }
1131 }
1132 }
1133
1134 /// <summary>
1135 /// Delete the avatar from this linkset (avatar is unsat).
1136 /// </summary>
1137 /// <param name="agentID"></param>
1138 public void DeleteAvatar(UUID agentID)
1139 {
1140 ScenePresence presence;
1141 if (m_scene.TryGetScenePresence(agentID, out presence))
1142 {
1143 if (m_linkedAvatars.Contains(presence))
1144 {
1145 m_linkedAvatars.Remove(presence);
1146 }
1147 }
1148 }
1149
1150 /// <summary>
1151 /// Returns the list of linked presences (avatars sat on this group)
1152 /// </summary>
1153 /// <param name="agentID"></param>
1154 public List<ScenePresence> GetLinkedAvatars()
1155 {
1156 return m_linkedAvatars;
1157 }
1158
1159 /// <summary>
1119 /// Attach this scene object to the given avatar. 1160 /// Attach this scene object to the given avatar.
1120 /// </summary> 1161 /// </summary>
1121 /// <param name="agentID"></param> 1162 /// <param name="agentID"></param>
@@ -2974,6 +3015,17 @@ namespace OpenSim.Region.Framework.Scenes
2974 } 3015 }
2975 } 3016 }
2976 3017
3018
3019
3020 /// <summary>
3021 /// Gets the number of parts
3022 /// </summary>
3023 /// <returns></returns>
3024 public int GetPartCount()
3025 {
3026 return Children.Count;
3027 }
3028
2977 /// <summary> 3029 /// <summary>
2978 /// Get the parts of this scene object 3030 /// Get the parts of this scene object
2979 /// </summary> 3031 /// </summary>