mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 17:32:42 +08:00
Allow moving an avatar as part of a linkset using llSetLinkPrimitiveParams. This unlocks an awful lot of poseball-free content, and is a step towards resolving mantis #59.
This commit is contained in:
@@ -110,8 +110,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
private long m_minPersistTime = 0;
|
||||
private Random m_rand;
|
||||
private bool m_suspendUpdates;
|
||||
|
||||
private System.Threading.ReaderWriterLockSlim m_partsLock = new System.Threading.ReaderWriterLockSlim();
|
||||
private System.Threading.ReaderWriterLockSlim m_partsLock = new System.Threading.ReaderWriterLockSlim();
|
||||
private List<ScenePresence> m_linkedAvatars = new List<ScenePresence>();
|
||||
|
||||
public bool areUpdatesSuspended
|
||||
{
|
||||
@@ -1115,6 +1115,47 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add the avatar to this linkset (avatar is sat).
|
||||
/// </summary>
|
||||
/// <param name="agentID"></param>
|
||||
public void AddAvatar(UUID agentID)
|
||||
{
|
||||
ScenePresence presence;
|
||||
if (m_scene.TryGetScenePresence(agentID, out presence))
|
||||
{
|
||||
if (!m_linkedAvatars.Contains(presence))
|
||||
{
|
||||
m_linkedAvatars.Add(presence);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete the avatar from this linkset (avatar is unsat).
|
||||
/// </summary>
|
||||
/// <param name="agentID"></param>
|
||||
public void DeleteAvatar(UUID agentID)
|
||||
{
|
||||
ScenePresence presence;
|
||||
if (m_scene.TryGetScenePresence(agentID, out presence))
|
||||
{
|
||||
if (m_linkedAvatars.Contains(presence))
|
||||
{
|
||||
m_linkedAvatars.Remove(presence);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the list of linked presences (avatars sat on this group)
|
||||
/// </summary>
|
||||
/// <param name="agentID"></param>
|
||||
public List<ScenePresence> GetLinkedAvatars()
|
||||
{
|
||||
return m_linkedAvatars;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Attach this scene object to the given avatar.
|
||||
/// </summary>
|
||||
@@ -2974,6 +3015,17 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets the number of parts
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int GetPartCount()
|
||||
{
|
||||
return Children.Count;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the parts of this scene object
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user