From 95c9a9939efc41e2f35defac5e3d7dae40890876 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Mon, 7 Jan 2008 02:33:22 +0000 Subject: 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 --- OpenSim/Region/Environment/Scenes/InnerScene.cs | 5 ++- OpenSim/Region/Environment/Scenes/Scene.cs | 48 +++++++++++----------- .../ExtensionsScriptModule/ScriptInterpretedAPI.cs | 4 +- 3 files changed, 30 insertions(+), 27 deletions(-) diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index 794cdae..0935b43 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs @@ -51,7 +51,8 @@ namespace OpenSim.Region.Environment.Scenes #region Fields public Dictionary ScenePresences; - public Dictionary SceneObjects; + // SceneObjects is not currently populated or used. + //public Dictionary SceneObjects; public Dictionary Entities; public BasicQuadTreeNode QuadTree; @@ -110,7 +111,7 @@ namespace OpenSim.Region.Environment.Scenes public void Close() { ScenePresences.Clear(); - SceneObjects.Clear(); + //SceneObjects.Clear(); Entities.Clear(); } diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 4156584..d8733f4 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -180,10 +180,10 @@ namespace OpenSim.Region.Environment.Scenes } // Local reference to the objects in the scene (which are held in innerScene) - public Dictionary Objects - { - get { return m_innerScene.SceneObjects; } - } +// public Dictionary Objects +// { +// get { return m_innerScene.SceneObjects; } +// } // Reference to all of the agents in the scene (root and child) protected Dictionary m_scenePresences @@ -192,11 +192,11 @@ namespace OpenSim.Region.Environment.Scenes set { m_innerScene.ScenePresences = value; } } - protected Dictionary m_sceneObjects - { - get { return m_innerScene.SceneObjects; } - set { m_innerScene.SceneObjects = value; } - } +// protected Dictionary m_sceneObjects +// { +// get { return m_innerScene.SceneObjects; } +// set { m_innerScene.SceneObjects = value; } +// } public Dictionary Entities { @@ -262,7 +262,7 @@ namespace OpenSim.Region.Environment.Scenes MainLog.Instance.Verbose("SCENE", "Creating new entitities instance"); Entities = new Dictionary(); m_scenePresences = new Dictionary(); - m_sceneObjects = new Dictionary(); + //m_sceneObjects = new Dictionary(); MainLog.Instance.Verbose("SCENE", "Creating LandMap"); Terrain = new TerrainEngine((int) RegionInfo.RegionLocX, (int) RegionInfo.RegionLocY); @@ -2277,20 +2277,20 @@ namespace OpenSim.Region.Environment.Scenes /// /// /// - public void ForEachObject(Action action) - { - List presenceList; - - lock (m_sceneObjects) - { - presenceList = new List(m_sceneObjects.Values); - } - - foreach (SceneObjectGroup presence in presenceList) - { - action(presence); - } - } +// public void ForEachObject(Action action) +// { +// List presenceList; +// +// lock (m_sceneObjects) +// { +// presenceList = new List(m_sceneObjects.Values); +// } +// +// foreach (SceneObjectGroup presence in presenceList) +// { +// action(presence); +// } +// } /// /// diff --git a/OpenSim/Region/ExtensionsScriptModule/ScriptInterpretedAPI.cs b/OpenSim/Region/ExtensionsScriptModule/ScriptInterpretedAPI.cs index d6613e9..b3a0d4f 100644 --- a/OpenSim/Region/ExtensionsScriptModule/ScriptInterpretedAPI.cs +++ b/OpenSim/Region/ExtensionsScriptModule/ScriptInterpretedAPI.cs @@ -69,7 +69,9 @@ namespace OpenSim.Region.ExtensionsScriptModule /// 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]; } } /// -- cgit v1.1