diff --git a/OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs b/OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs index 7b3ce5a278..ed211e4112 100644 --- a/OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs +++ b/OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs @@ -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 diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index c7068fa369..5256c9ec52 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs @@ -210,6 +210,22 @@ namespace OpenSim.Region.Environment.Scenes AddSceneObject(sceneObject, attachToBackup); } + + /// + /// 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. + /// + /// + /// + /// If true, the object is made persistent into the scene. + /// If false, the object will not persist over server restarts + /// + /// true if the object was added, false if an object with the same uuid was already in the scene + /// + protected internal void AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup) + { + AddSceneObject(sceneObject, attachToBackup); + } /// /// 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 /// /// true if the object was added, false if an object with the same uuid was already in the scene /// - protected internal bool AddSceneObject(SceneObjectGroup sceneObject, bool attachToBackup) + protected bool AddSceneObject(SceneObjectGroup sceneObject, bool attachToBackup) { sceneObject.ApplyPhysics(m_parentScene.m_physicalPrim); sceneObject.ScheduleGroupForFullUpdate(); diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 2bd2bad059..adf325461c 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs @@ -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; diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index ecb54e6a16..a5805af3c9 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -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 } /// - /// Add an object to the scene + /// Add a newly created object to the scene /// /// /// /// If true, the object is made persistent into the scene. /// If false, the object will not persist over server restarts /// - public void AddSceneObject(SceneObjectGroup sceneObject, bool attachToBackup) + public void AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup) { - m_innerScene.AddSceneObject(sceneObject, attachToBackup); + m_innerScene.AddNewSceneObject(sceneObject, attachToBackup); } /// diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 52360146b9..dd9c706b32 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -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(); } diff --git a/OpenSim/Region/Examples/SimpleModule/RegionModule.cs b/OpenSim/Region/Examples/SimpleModule/RegionModule.cs index 2e6ed42756..327bd752fa 100644 --- a/OpenSim/Region/Examples/SimpleModule/RegionModule.cs +++ b/OpenSim/Region/Examples/SimpleModule/RegionModule.cs @@ -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()