undo previous changes

add a GetGroupByPrim() method to Scene.cs
delete a redundant method
0.6.8-post-fixes
dahlia 2009-11-13 22:13:40 -08:00
parent e7d0aa75ba
commit 2e24415077
4 changed files with 12 additions and 16 deletions

View File

@ -803,20 +803,6 @@ namespace OpenSim.Region.Framework.Scenes
InventoryService.DeleteFolders(remoteClient.AgentId, folderIDs); InventoryService.DeleteFolders(remoteClient.AgentId, folderIDs);
} }
private SceneObjectGroup GetGroupByPrim(uint localID)
{
List<EntityBase> EntityList = GetEntities();
foreach (EntityBase ent in EntityList)
{
if (ent is SceneObjectGroup)
{
if (((SceneObjectGroup) ent).HasChildPrim(localID))
return (SceneObjectGroup) ent;
}
}
return null;
}
/// <summary> /// <summary>
/// Send the details of a prim's inventory to the client. /// Send the details of a prim's inventory to the client.

View File

@ -4383,6 +4383,16 @@ namespace OpenSim.Region.Framework.Scenes
return m_sceneGraph.GetSceneObjectPart(fullID); return m_sceneGraph.GetSceneObjectPart(fullID);
} }
/// <summary>
/// Get a scene object group that contains the prim with the given local id
/// </summary>
/// <param name="localID"></param>
/// <returns>null if no scene object group containing that prim is found</returns>
public SceneObjectGroup GetGroupByPrim(uint localID)
{
return m_sceneGraph.GetGroupByPrim(localID);
}
public bool TryGetAvatar(UUID avatarId, out ScenePresence avatar) public bool TryGetAvatar(UUID avatarId, out ScenePresence avatar)
{ {
return m_sceneGraph.TryGetAvatar(avatarId, out avatar); return m_sceneGraph.TryGetAvatar(avatarId, out avatar);

View File

@ -928,7 +928,7 @@ namespace OpenSim.Region.Framework.Scenes
/// </summary> /// </summary>
/// <param name="fullID"></param> /// <param name="fullID"></param>
/// <returns>null if no scene object group containing that prim is found</returns> /// <returns>null if no scene object group containing that prim is found</returns>
public SceneObjectGroup GetGroupByPrim(UUID fullID) private SceneObjectGroup GetGroupByPrim(UUID fullID)
{ {
SceneObjectGroup sog; SceneObjectGroup sog;
lock (SceneObjectGroupsByFullID) lock (SceneObjectGroupsByFullID)

View File

@ -3907,7 +3907,7 @@ namespace OpenSim.Region.Framework.Scenes
} }
else else
{ {
group = Scene.SceneGraph.GetGroupByPrim(data.localID); group = Scene.GetGroupByPrim(data.localID);
if (group != null) if (group != null)
return GetSOGUpdatePriority(group); return GetSOGUpdatePriority(group);
} }