* 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
This commit is contained in:
Justin Clarke Casey
2008-06-12 17:49:08 +00:00
parent 74017a4331
commit 8714833986
7 changed files with 46 additions and 58 deletions

View File

@@ -64,7 +64,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);
scene.AddSceneObject(obj, true);
SceneObjectPart rootPart = obj.GetChildPart(obj.UUID);
// Apply loadOffsets for load/import and move combinations
@@ -193,8 +193,7 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="xmlData"></param>
protected static void CreatePrimFromXml2(Scene scene, string xmlData)
{
SceneObjectGroup obj = new SceneObjectGroup(xmlData);
SceneObjectGroup obj = new SceneObjectGroup(xmlData);
LLVector3 receivedVelocity = obj.RootPart.Velocity;
//System.Console.WriteLine(obj.RootPart.Velocity.ToString());