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 dictionaryafrisby
parent
3e75dede1b
commit
95c9a9939e
|
@ -51,7 +51,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
#region Fields
|
#region Fields
|
||||||
|
|
||||||
public Dictionary<LLUUID, ScenePresence> ScenePresences;
|
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 Dictionary<LLUUID, EntityBase> Entities;
|
||||||
|
|
||||||
public BasicQuadTreeNode QuadTree;
|
public BasicQuadTreeNode QuadTree;
|
||||||
|
@ -110,7 +111,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
public void Close()
|
public void Close()
|
||||||
{
|
{
|
||||||
ScenePresences.Clear();
|
ScenePresences.Clear();
|
||||||
SceneObjects.Clear();
|
//SceneObjects.Clear();
|
||||||
Entities.Clear();
|
Entities.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -180,10 +180,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
// Local reference to the objects in the scene (which are held in innerScene)
|
// Local reference to the objects in the scene (which are held in innerScene)
|
||||||
public Dictionary<LLUUID, SceneObjectGroup> Objects
|
// public Dictionary<LLUUID, SceneObjectGroup> Objects
|
||||||
{
|
// {
|
||||||
get { return m_innerScene.SceneObjects; }
|
// get { return m_innerScene.SceneObjects; }
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Reference to all of the agents in the scene (root and child)
|
// Reference to all of the agents in the scene (root and child)
|
||||||
protected Dictionary<LLUUID, ScenePresence> m_scenePresences
|
protected Dictionary<LLUUID, ScenePresence> m_scenePresences
|
||||||
|
@ -192,11 +192,11 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
set { m_innerScene.ScenePresences = value; }
|
set { m_innerScene.ScenePresences = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Dictionary<LLUUID, SceneObjectGroup> m_sceneObjects
|
// protected Dictionary<LLUUID, SceneObjectGroup> m_sceneObjects
|
||||||
{
|
// {
|
||||||
get { return m_innerScene.SceneObjects; }
|
// get { return m_innerScene.SceneObjects; }
|
||||||
set { m_innerScene.SceneObjects = value; }
|
// set { m_innerScene.SceneObjects = value; }
|
||||||
}
|
// }
|
||||||
|
|
||||||
public Dictionary<LLUUID, EntityBase> Entities
|
public Dictionary<LLUUID, EntityBase> Entities
|
||||||
{
|
{
|
||||||
|
@ -262,7 +262,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
MainLog.Instance.Verbose("SCENE", "Creating new entitities instance");
|
MainLog.Instance.Verbose("SCENE", "Creating new entitities instance");
|
||||||
Entities = new Dictionary<LLUUID, EntityBase>();
|
Entities = new Dictionary<LLUUID, EntityBase>();
|
||||||
m_scenePresences = new Dictionary<LLUUID, ScenePresence>();
|
m_scenePresences = new Dictionary<LLUUID, ScenePresence>();
|
||||||
m_sceneObjects = new Dictionary<LLUUID, SceneObjectGroup>();
|
//m_sceneObjects = new Dictionary<LLUUID, SceneObjectGroup>();
|
||||||
|
|
||||||
MainLog.Instance.Verbose("SCENE", "Creating LandMap");
|
MainLog.Instance.Verbose("SCENE", "Creating LandMap");
|
||||||
Terrain = new TerrainEngine((int) RegionInfo.RegionLocX, (int) RegionInfo.RegionLocY);
|
Terrain = new TerrainEngine((int) RegionInfo.RegionLocX, (int) RegionInfo.RegionLocY);
|
||||||
|
@ -2277,20 +2277,20 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="action"></param>
|
/// <param name="action"></param>
|
||||||
public void ForEachObject(Action<SceneObjectGroup> action)
|
// public void ForEachObject(Action<SceneObjectGroup> action)
|
||||||
{
|
// {
|
||||||
List<SceneObjectGroup> presenceList;
|
// List<SceneObjectGroup> presenceList;
|
||||||
|
//
|
||||||
lock (m_sceneObjects)
|
// lock (m_sceneObjects)
|
||||||
{
|
// {
|
||||||
presenceList = new List<SceneObjectGroup>(m_sceneObjects.Values);
|
// presenceList = new List<SceneObjectGroup>(m_sceneObjects.Values);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
foreach (SceneObjectGroup presence in presenceList)
|
// foreach (SceneObjectGroup presence in presenceList)
|
||||||
{
|
// {
|
||||||
action(presence);
|
// action(presence);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
|
|
|
@ -69,7 +69,9 @@ namespace OpenSim.Region.ExtensionsScriptModule
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public SceneObjectGroup Task
|
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>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in New Issue