mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 17:32:42 +08:00
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
This commit is contained in:
@@ -945,6 +945,18 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// </remarks>
|
||||
public UUID FromFolderID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// IDs of all avatars sat on this scene object.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// We need this so that we can maintain a linkset wide ordering of avatars sat on different parts.
|
||||
/// This must be locked before it is read or written.
|
||||
/// SceneObjectPart sitting avatar add/remove code also locks on this object to avoid race conditions.
|
||||
/// No avatar should appear more than once in this list.
|
||||
/// Do not manipulate this list directly - use the Add/Remove sitting avatar methods on SceneObjectPart.
|
||||
/// </remarks>
|
||||
protected internal List<UUID> m_sittingAvatars = new List<UUID>();
|
||||
|
||||
#endregion
|
||||
|
||||
// ~SceneObjectGroup()
|
||||
@@ -4522,6 +4534,20 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
return count;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a copy of the list of sitting avatars on all prims of this object.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This is sorted by the order in which avatars sat down. If an avatar stands up then all avatars that sat
|
||||
/// down after it move one place down the list.
|
||||
/// </remarks>
|
||||
/// <returns>A list of the sitting avatars. Returns an empty list if there are no sitting avatars.</returns>
|
||||
public List<UUID> GetSittingAvatars()
|
||||
{
|
||||
lock (m_sittingAvatars)
|
||||
return new List<UUID>(m_sittingAvatars);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the number of sitting avatars.
|
||||
/// </summary>
|
||||
@@ -4529,11 +4555,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// <returns></returns>
|
||||
public int GetSittingAvatarsCount()
|
||||
{
|
||||
int count = 0;
|
||||
|
||||
Array.ForEach<SceneObjectPart>(m_parts.GetArray(), p => count += p.GetSittingAvatarsCount());
|
||||
|
||||
return count;
|
||||
lock (m_sittingAvatars)
|
||||
return m_sittingAvatars.Count;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
@@ -4542,7 +4565,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
|
||||
#region ISceneObject
|
||||
|
||||
|
||||
public virtual ISceneObject CloneForNewScene()
|
||||
{
|
||||
SceneObjectGroup sog = Copy(false);
|
||||
|
||||
Reference in New Issue
Block a user