From 42693f3b20cf139820aca42b5dd07938a3f96022 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Sat, 24 May 2008 21:57:00 +0000 Subject: * Refactor: Push some dictionary initialization down from Scene into InnerScene --- OpenSim/Region/Environment/Scenes/InnerScene.cs | 13 +++++++++---- OpenSim/Region/Environment/Scenes/Scene.cs | 11 +++++------ 2 files changed, 14 insertions(+), 10 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes') diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index 14ffa25..4615e7a 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs @@ -53,11 +53,11 @@ namespace OpenSim.Region.Environment.Scenes #region Fields - internal Dictionary ScenePresences; + internal Dictionary ScenePresences = new Dictionary(); // SceneObjects is not currently populated or used. //public Dictionary SceneObjects; - internal Dictionary Entities; - internal Dictionary RestorePresences; + internal Dictionary Entities = new Dictionary(); + internal Dictionary RestorePresences = new Dictionary(); public BasicQuadTreeNode QuadTree; @@ -825,6 +825,11 @@ namespace OpenSim.Region.Environment.Scenes return false; } + /// + /// Returns a list of the entities in the scene. This is a new list so operations perform on the list itself + /// will not affect the original list of objects in the scene. + /// + /// public List GetEntities() { List result; @@ -1378,7 +1383,7 @@ namespace OpenSim.Region.Environment.Scenes /// public void DuplicateObject(uint originalPrim, LLVector3 offset, uint flags, LLUUID AgentID, LLUUID GroupID) { - m_log.DebugFormat("[SCENE]: Duplication of object {0} at offset {1} requested by agent {2}", originalPrim, offset, AgentID); + //m_log.DebugFormat("[SCENE]: Duplication of object {0} at offset {1} requested by agent {2}", originalPrim, offset, AgentID); List EntityList = GetEntities(); diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 60ba898..7c198bf 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -261,12 +261,6 @@ namespace OpenSim.Region.Environment.Scenes RegisterDefaultSceneEvents(); - m_log.Info("[SCENE]: Creating new entitities instance"); - Entities = new Dictionary(); - m_scenePresences = new Dictionary(); - //m_sceneObjects = new Dictionary(); - m_restorePresences = new Dictionary(); - m_httpListener = httpServer; m_dumpAssetsToFile = dumpAssetsToFile; @@ -3225,6 +3219,11 @@ namespace OpenSim.Region.Environment.Scenes m_innerScene.ForEachClient(action); } + /// + /// Returns a list of the entities in the scene. This is a new list so operations perform on the list itself + /// will not affect the original list of objects in the scene. + /// + /// public List GetEntities() { return m_innerScene.GetEntities(); -- cgit v1.1