diff --git a/OpenSim/Region/Environment/Scenes/EntityList.cs b/OpenSim/Region/Environment/Scenes/EntityList.cs index 4a0e6688a0..c64e549151 100644 --- a/OpenSim/Region/Environment/Scenes/EntityList.cs +++ b/OpenSim/Region/Environment/Scenes/EntityList.cs @@ -57,8 +57,8 @@ namespace OpenSim.Region.Environment.Scenes // // Add(SOG) // Add(SP) - // Remove(SOG) - // Remove(SP) + // RemoveObject(SOG) + // RemovePresence(SP) // List() // ListObjects() // ListPresenes() @@ -77,5 +77,36 @@ namespace OpenSim.Region.Environment.Scenes { m_pres_by_uuid[pres.UUID] = pres; } + + public SceneObjectGroup RemoveObject(LLUUID uuid) + { + SceneObjectGroup sog = null; + try + { + sog = (SceneObjectGroup)m_obj_by_uuid[uuid]; + m_obj_by_uuid.Remove(uuid); + m_obj_by_local.Remove(sog.LocalId); + } + catch (Exception e) + { + sog = null; + } + return sog; + } + + public ScenePresence RemovePresence(LLUUID uuid) + { + ScenePresence sp = null; + try + { + sp = (ScenePresence)m_pres_by_uuid[uuid]; + m_pres_by_uuid.Remove(uuid); + } + catch (Exception e) + { + sp = null; + } + return sp; + } } } \ No newline at end of file