remove calls

0.6.0-stable
Sean Dague 2008-09-04 22:06:13 +00:00
parent ff4b6fc1b5
commit 6e1bcbcf48
1 changed files with 33 additions and 2 deletions

View File

@ -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;
}
}
}