* refactor: fission InnerScene.AddSceneObject()

0.6.0-stable
Justin Clarke Casey 2008-06-27 14:25:36 +00:00
parent c8cd381c56
commit 836557a2f7
6 changed files with 28 additions and 12 deletions

View File

@ -68,7 +68,7 @@ namespace OpenSim.Region.Environment.Scenes
//if we want this to be a import method then we need new uuids for the object to avoid any clashes
//obj.RegenerateFullIDs();
scene.AddSceneObject(obj, true);
scene.AddNewSceneObject(obj, true);
}
}
else

View File

@ -211,6 +211,22 @@ namespace OpenSim.Region.Environment.Scenes
AddSceneObject(sceneObject, attachToBackup);
}
/// <summary>
/// Add a newly created object to the scene. This will both update the scene, and send information about the
/// new object to all clients interested in the scene.
/// </summary>
/// <param name="sceneObject"></param>
/// <param name="attachToBackup">
/// If true, the object is made persistent into the scene.
/// If false, the object will not persist over server restarts
/// </param>
/// <returns>true if the object was added, false if an object with the same uuid was already in the scene
/// </returns>
protected internal void AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup)
{
AddSceneObject(sceneObject, attachToBackup);
}
/// <summary>
/// Add an object to the scene. This will both update the scene, and send information about the
/// new object to all clients interested in the scene.
@ -222,7 +238,7 @@ namespace OpenSim.Region.Environment.Scenes
/// </param>
/// <returns>true if the object was added, false if an object with the same uuid was already in the scene
/// </returns>
protected internal bool AddSceneObject(SceneObjectGroup sceneObject, bool attachToBackup)
protected bool AddSceneObject(SceneObjectGroup sceneObject, bool attachToBackup)
{
sceneObject.ApplyPhysics(m_parentScene.m_physicalPrim);
sceneObject.ScheduleGroupForFullUpdate();

View File

@ -1795,7 +1795,7 @@ namespace OpenSim.Region.Environment.Scenes
group.ResetIDs();
AddSceneObject(group, true);
AddNewSceneObject(group, true);
// if attachment we set it's asset id so object updates can reflect that
// if not, we set it's position in world.
@ -1917,7 +1917,7 @@ namespace OpenSim.Region.Environment.Scenes
}
group.ResetIDs();
AddSceneObject(group, true);
AddNewSceneObject(group, true);
// Set the startup parameter for on_rez event and llGetStartParameter() function
group.StartParameter = param;

View File

@ -1609,7 +1609,7 @@ namespace OpenSim.Region.Environment.Scenes
AdaptTree(ref shape);
}
AddSceneObject(sceneOb, true);
AddNewSceneObject(sceneOb, true);
return sceneOb;
}
@ -1657,16 +1657,16 @@ namespace OpenSim.Region.Environment.Scenes
}
/// <summary>
/// Add an object to the scene
/// Add a newly created object to the scene
/// </summary>
/// <param name="sceneObject"></param>
/// <param name="attachToBackup">
/// If true, the object is made persistent into the scene.
/// If false, the object will not persist over server restarts
/// </param>
public void AddSceneObject(SceneObjectGroup sceneObject, bool attachToBackup)
public void AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup)
{
m_innerScene.AddSceneObject(sceneObject, attachToBackup);
m_innerScene.AddNewSceneObject(sceneObject, attachToBackup);
}
/// <summary>

View File

@ -1838,7 +1838,7 @@ namespace OpenSim.Region.Environment.Scenes
SceneObjectGroup objectGroup = new SceneObjectGroup(m_scene, m_regionHandle, linkPart);
m_scene.AddSceneObject(objectGroup, true);
m_scene.AddNewSceneObject(objectGroup, true);
ScheduleGroupForFullUpdate();
}

View File

@ -76,7 +76,7 @@ namespace OpenSim.Region.Examples.SimpleModule
}
FileSystemObject fileObject = new FileSystemObject(m_scene, fileInfo, filePos);
m_scene.AddSceneObject(fileObject, true);
m_scene.AddNewSceneObject(fileObject, true);
}
}
@ -106,7 +106,7 @@ namespace OpenSim.Region.Examples.SimpleModule
ComplexObject complexObject =
new ComplexObject(m_scene, regionInfo.RegionHandle, LLUUID.Zero, m_scene.PrimIDAllocate(),
pos + posOffset);
m_scene.AddSceneObject(complexObject, true);
m_scene.AddNewSceneObject(complexObject, true);
}
}
@ -115,7 +115,7 @@ namespace OpenSim.Region.Examples.SimpleModule
SceneObjectGroup sceneObject =
new CpuCounterObject(m_scene, regionInfo.RegionHandle, LLUUID.Zero, m_scene.PrimIDAllocate(),
pos + new LLVector3(1f, 1f, 1f));
m_scene.AddSceneObject(sceneObject, true);
m_scene.AddNewSceneObject(sceneObject, true);
}
public void Close()