* 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
|
||||
//obj.RegenerateFullIDs();
|
||||
|
||||
scene.AddSceneObject(obj, true);
|
||||
scene.AddNewSceneObject(obj, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -210,6 +210,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
|
||||
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue