From 2e24415077ab4febf61e684fec8202a3a3e83b77 Mon Sep 17 00:00:00 2001 From: dahlia Date: Fri, 13 Nov 2009 22:13:40 -0800 Subject: undo previous changes add a GetGroupByPrim() method to Scene.cs delete a redundant method --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 14 -------------- OpenSim/Region/Framework/Scenes/Scene.cs | 10 ++++++++++ OpenSim/Region/Framework/Scenes/SceneGraph.cs | 2 +- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 2 +- 4 files changed, 12 insertions(+), 16 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index d790041..66fb918 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -803,20 +803,6 @@ namespace OpenSim.Region.Framework.Scenes InventoryService.DeleteFolders(remoteClient.AgentId, folderIDs); } - private SceneObjectGroup GetGroupByPrim(uint localID) - { - List EntityList = GetEntities(); - - foreach (EntityBase ent in EntityList) - { - if (ent is SceneObjectGroup) - { - if (((SceneObjectGroup) ent).HasChildPrim(localID)) - return (SceneObjectGroup) ent; - } - } - return null; - } /// /// Send the details of a prim's inventory to the client. diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 4531e06..aeca7df 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -4383,6 +4383,16 @@ namespace OpenSim.Region.Framework.Scenes return m_sceneGraph.GetSceneObjectPart(fullID); } + /// + /// Get a scene object group that contains the prim with the given local id + /// + /// + /// null if no scene object group containing that prim is found + public SceneObjectGroup GetGroupByPrim(uint localID) + { + return m_sceneGraph.GetGroupByPrim(localID); + } + public bool TryGetAvatar(UUID avatarId, out ScenePresence avatar) { return m_sceneGraph.TryGetAvatar(avatarId, out avatar); diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 8ff441d..2fdb48d 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -928,7 +928,7 @@ namespace OpenSim.Region.Framework.Scenes /// /// /// null if no scene object group containing that prim is found - public SceneObjectGroup GetGroupByPrim(UUID fullID) + private SceneObjectGroup GetGroupByPrim(UUID fullID) { SceneObjectGroup sog; lock (SceneObjectGroupsByFullID) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 17026e5..08c144a 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3907,7 +3907,7 @@ namespace OpenSim.Region.Framework.Scenes } else { - group = Scene.SceneGraph.GetGroupByPrim(data.localID); + group = Scene.GetGroupByPrim(data.localID); if (group != null) return GetSOGUpdatePriority(group); } -- cgit v1.1