* refactor: fission InnerScene.AddSceneObject()
parent
c8cd381c56
commit
836557a2f7
|
@ -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
|
//if we want this to be a import method then we need new uuids for the object to avoid any clashes
|
||||||
//obj.RegenerateFullIDs();
|
//obj.RegenerateFullIDs();
|
||||||
|
|
||||||
scene.AddSceneObject(obj, true);
|
scene.AddNewSceneObject(obj, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -210,6 +210,22 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
AddSceneObject(sceneObject, attachToBackup);
|
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>
|
/// <summary>
|
||||||
/// Add an object to the scene. This will both update the scene, and send information about the
|
/// Add an object to the scene. This will both update the scene, and send information about the
|
||||||
|
@ -222,7 +238,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <returns>true if the object was added, false if an object with the same uuid was already in the scene
|
/// <returns>true if the object was added, false if an object with the same uuid was already in the scene
|
||||||
/// </returns>
|
/// </returns>
|
||||||
protected internal bool AddSceneObject(SceneObjectGroup sceneObject, bool attachToBackup)
|
protected bool AddSceneObject(SceneObjectGroup sceneObject, bool attachToBackup)
|
||||||
{
|
{
|
||||||
sceneObject.ApplyPhysics(m_parentScene.m_physicalPrim);
|
sceneObject.ApplyPhysics(m_parentScene.m_physicalPrim);
|
||||||
sceneObject.ScheduleGroupForFullUpdate();
|
sceneObject.ScheduleGroupForFullUpdate();
|
||||||
|
|
|
@ -1795,7 +1795,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
group.ResetIDs();
|
group.ResetIDs();
|
||||||
|
|
||||||
AddSceneObject(group, true);
|
AddNewSceneObject(group, true);
|
||||||
|
|
||||||
// if attachment we set it's asset id so object updates can reflect that
|
// if attachment we set it's asset id so object updates can reflect that
|
||||||
// if not, we set it's position in world.
|
// if not, we set it's position in world.
|
||||||
|
@ -1917,7 +1917,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
group.ResetIDs();
|
group.ResetIDs();
|
||||||
|
|
||||||
AddSceneObject(group, true);
|
AddNewSceneObject(group, true);
|
||||||
|
|
||||||
// Set the startup parameter for on_rez event and llGetStartParameter() function
|
// Set the startup parameter for on_rez event and llGetStartParameter() function
|
||||||
group.StartParameter = param;
|
group.StartParameter = param;
|
||||||
|
|
|
@ -1609,7 +1609,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
AdaptTree(ref shape);
|
AdaptTree(ref shape);
|
||||||
}
|
}
|
||||||
|
|
||||||
AddSceneObject(sceneOb, true);
|
AddNewSceneObject(sceneOb, true);
|
||||||
|
|
||||||
return sceneOb;
|
return sceneOb;
|
||||||
}
|
}
|
||||||
|
@ -1657,16 +1657,16 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Add an object to the scene
|
/// Add a newly created object to the scene
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sceneObject"></param>
|
/// <param name="sceneObject"></param>
|
||||||
/// <param name="attachToBackup">
|
/// <param name="attachToBackup">
|
||||||
/// If true, the object is made persistent into the scene.
|
/// If true, the object is made persistent into the scene.
|
||||||
/// If false, the object will not persist over server restarts
|
/// If false, the object will not persist over server restarts
|
||||||
/// </param>
|
/// </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>
|
/// <summary>
|
||||||
|
|
|
@ -1838,7 +1838,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
SceneObjectGroup objectGroup = new SceneObjectGroup(m_scene, m_regionHandle, linkPart);
|
SceneObjectGroup objectGroup = new SceneObjectGroup(m_scene, m_regionHandle, linkPart);
|
||||||
|
|
||||||
m_scene.AddSceneObject(objectGroup, true);
|
m_scene.AddNewSceneObject(objectGroup, true);
|
||||||
|
|
||||||
ScheduleGroupForFullUpdate();
|
ScheduleGroupForFullUpdate();
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,7 @@ namespace OpenSim.Region.Examples.SimpleModule
|
||||||
}
|
}
|
||||||
|
|
||||||
FileSystemObject fileObject = new FileSystemObject(m_scene, fileInfo, filePos);
|
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 =
|
ComplexObject complexObject =
|
||||||
new ComplexObject(m_scene, regionInfo.RegionHandle, LLUUID.Zero, m_scene.PrimIDAllocate(),
|
new ComplexObject(m_scene, regionInfo.RegionHandle, LLUUID.Zero, m_scene.PrimIDAllocate(),
|
||||||
pos + posOffset);
|
pos + posOffset);
|
||||||
m_scene.AddSceneObject(complexObject, true);
|
m_scene.AddNewSceneObject(complexObject, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ namespace OpenSim.Region.Examples.SimpleModule
|
||||||
SceneObjectGroup sceneObject =
|
SceneObjectGroup sceneObject =
|
||||||
new CpuCounterObject(m_scene, regionInfo.RegionHandle, LLUUID.Zero, m_scene.PrimIDAllocate(),
|
new CpuCounterObject(m_scene, regionInfo.RegionHandle, LLUUID.Zero, m_scene.PrimIDAllocate(),
|
||||||
pos + new LLVector3(1f, 1f, 1f));
|
pos + new LLVector3(1f, 1f, 1f));
|
||||||
m_scene.AddSceneObject(sceneObject, true);
|
m_scene.AddNewSceneObject(sceneObject, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
|
|
Loading…
Reference in New Issue