From 7ff4eec79cf16886439604a23126abd195ae8b2e Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 7 Jul 2012 00:02:45 +0100
Subject: Remove redundant SetScene() function in Scene.AddSceneObject()
This is always done later on in SceneGraph.AddSceneObject() if the call hasn't failed due to sanity checks.
There's no other purpose for this method to exist and it's dangerous/pointless to call in other conditions.
---
OpenSim/Region/Framework/Scenes/Scene.cs | 2 --
OpenSim/Region/Framework/Scenes/SceneGraph.cs | 6 +++---
OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 10 ----------
3 files changed, 3 insertions(+), 15 deletions(-)
(limited to 'OpenSim/Region/Framework/Scenes')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 5c7bca0..ec911a5 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2554,8 +2554,6 @@ namespace OpenSim.Region.Framework.Scenes
/// True if the SceneObjectGroup was added, False if it was not
public bool AddSceneObject(SceneObjectGroup sceneObject)
{
- sceneObject.SetScene(this);
-
// Force allocation of new LocalId
//
SceneObjectPart[] parts = sceneObject.Parts;
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index bc9a585..2be5364 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -355,9 +355,9 @@ namespace OpenSim.Region.Framework.Scenes
if (Entities.ContainsKey(sceneObject.UUID))
{
-// m_log.DebugFormat(
-// "[SCENEGRAPH]: Scene graph for {0} already contains object {1} in AddSceneObject()",
-// m_parentScene.RegionInfo.RegionName, sceneObject.UUID);
+ m_log.DebugFormat(
+ "[SCENEGRAPH]: Scene graph for {0} already contains object {1} in AddSceneObject()",
+ m_parentScene.RegionInfo.RegionName, sceneObject.UUID);
return false;
}
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 96cc376..4e0e183 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -1055,16 +1055,6 @@ namespace OpenSim.Region.Framework.Scenes
{
return Utils.FloatToUInt16(m_scene.TimeDilation, 0.0f, 1.0f);
}
-
- ///
- /// Added as a way for the storage provider to reset the scene,
- /// most likely a better way to do this sort of thing but for now...
- ///
- ///
- public void SetScene(Scene scene)
- {
- m_scene = scene;
- }
///
/// Set a part to act as the root part for this scene object
--
cgit v1.1