Commenting out InnerScene.SceneObjects for now since it was unpopulated and not used by active code (as far as I can see), so a source of confusion. All

current code uses the Entities dictionary
afrisby
Justin Clarke Casey 2008-01-07 02:33:22 +00:00
parent 3e75dede1b
commit 95c9a9939e
3 changed files with 30 additions and 27 deletions

View File

@ -51,7 +51,8 @@ namespace OpenSim.Region.Environment.Scenes
#region Fields
public Dictionary<LLUUID, ScenePresence> ScenePresences;
public Dictionary<LLUUID, SceneObjectGroup> SceneObjects;
// SceneObjects is not currently populated or used.
//public Dictionary<LLUUID, SceneObjectGroup> SceneObjects;
public Dictionary<LLUUID, EntityBase> Entities;
public BasicQuadTreeNode QuadTree;
@ -110,7 +111,7 @@ namespace OpenSim.Region.Environment.Scenes
public void Close()
{
ScenePresences.Clear();
SceneObjects.Clear();
//SceneObjects.Clear();
Entities.Clear();
}

View File

@ -180,10 +180,10 @@ namespace OpenSim.Region.Environment.Scenes
}
// Local reference to the objects in the scene (which are held in innerScene)
public Dictionary<LLUUID, SceneObjectGroup> Objects
{
get { return m_innerScene.SceneObjects; }
}
// public Dictionary<LLUUID, SceneObjectGroup> Objects
// {
// get { return m_innerScene.SceneObjects; }
// }
// Reference to all of the agents in the scene (root and child)
protected Dictionary<LLUUID, ScenePresence> m_scenePresences
@ -192,11 +192,11 @@ namespace OpenSim.Region.Environment.Scenes
set { m_innerScene.ScenePresences = value; }
}
protected Dictionary<LLUUID, SceneObjectGroup> m_sceneObjects
{
get { return m_innerScene.SceneObjects; }
set { m_innerScene.SceneObjects = value; }
}
// protected Dictionary<LLUUID, SceneObjectGroup> m_sceneObjects
// {
// get { return m_innerScene.SceneObjects; }
// set { m_innerScene.SceneObjects = value; }
// }
public Dictionary<LLUUID, EntityBase> Entities
{
@ -262,7 +262,7 @@ namespace OpenSim.Region.Environment.Scenes
MainLog.Instance.Verbose("SCENE", "Creating new entitities instance");
Entities = new Dictionary<LLUUID, EntityBase>();
m_scenePresences = new Dictionary<LLUUID, ScenePresence>();
m_sceneObjects = new Dictionary<LLUUID, SceneObjectGroup>();
//m_sceneObjects = new Dictionary<LLUUID, SceneObjectGroup>();
MainLog.Instance.Verbose("SCENE", "Creating LandMap");
Terrain = new TerrainEngine((int) RegionInfo.RegionLocX, (int) RegionInfo.RegionLocY);
@ -2277,20 +2277,20 @@ namespace OpenSim.Region.Environment.Scenes
///
/// </summary>
/// <param name="action"></param>
public void ForEachObject(Action<SceneObjectGroup> action)
{
List<SceneObjectGroup> presenceList;
lock (m_sceneObjects)
{
presenceList = new List<SceneObjectGroup>(m_sceneObjects.Values);
}
foreach (SceneObjectGroup presence in presenceList)
{
action(presence);
}
}
// public void ForEachObject(Action<SceneObjectGroup> action)
// {
// List<SceneObjectGroup> presenceList;
//
// lock (m_sceneObjects)
// {
// presenceList = new List<SceneObjectGroup>(m_sceneObjects.Values);
// }
//
// foreach (SceneObjectGroup presence in presenceList)
// {
// action(presence);
// }
// }
/// <summary>
///

View File

@ -69,7 +69,9 @@ namespace OpenSim.Region.ExtensionsScriptModule
/// </summary>
public SceneObjectGroup Task
{
get { return Scene.Objects[ObjectID]; }
// XXX Casting not ideal, but previous Scene.Objects propery wasn't actually populated, so
// wouldn't have worked anyway.
get { return (SceneObjectGroup)Scene.Entities[ObjectID]; }
}
/// <summary>