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.
This commit is contained in:
Justin Clark-Casey (justincc)
2012-07-07 00:02:45 +01:00
parent f1f390cfdf
commit 7ff4eec79c
7 changed files with 34 additions and 29 deletions

View File

@@ -2554,8 +2554,6 @@ namespace OpenSim.Region.Framework.Scenes
/// <returns>True if the SceneObjectGroup was added, False if it was not</returns>
public bool AddSceneObject(SceneObjectGroup sceneObject)
{
sceneObject.SetScene(this);
// Force allocation of new LocalId
//
SceneObjectPart[] parts = sceneObject.Parts;

View File

@@ -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;
}

View File

@@ -1055,16 +1055,6 @@ namespace OpenSim.Region.Framework.Scenes
{
return Utils.FloatToUInt16(m_scene.TimeDilation, 0.0f, 1.0f);
}
/// <summary>
/// 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...
/// </summary>
/// <param name="scene"></param>
public void SetScene(Scene scene)
{
m_scene = scene;
}
/// <summary>
/// Set a part to act as the root part for this scene object