From 8714833986cef44787fd57a61699b7bdcfd3d3bb Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Thu, 12 Jun 2008 17:49:08 +0000 Subject: * refactor: For new objects, move attach to backup to occur when adding to a scene, rather than on creation of the group * Adding to a scene is now parameterized such that one can choose not to actually persist that group * This is to support a use case where a module wants a scene which consists of both objects which are persisted, and ones which are just temporary for the lifetime of that server instance --- OpenSim/Region/Environment/Scenes/Scene.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs') diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 526c125..43bb709 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -1492,7 +1492,7 @@ namespace OpenSim.Region.Environment.Scenes { SceneObjectGroup sceneOb = new SceneObjectGroup(this, m_regionHandle, ownerID, PrimIDAllocate(), pos, rot, shape); - AddSceneObject(sceneOb); + AddSceneObject(sceneOb, true); SceneObjectPart rootPart = sceneOb.GetChildPart(sceneOb.UUID); // if grass or tree, make phantom //rootPart.TrimPermissions(); @@ -1556,9 +1556,13 @@ namespace OpenSim.Region.Environment.Scenes /// Add an object to the scene /// /// - public void AddSceneObject(SceneObjectGroup sceneObject) + /// + /// 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) { - m_innerScene.AddSceneObject(sceneObject); + m_innerScene.AddSceneObject(sceneObject, attachToBackup); } /// -- cgit v1.1