aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs43
1 files changed, 6 insertions, 37 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index a3c5a03..4bd3222 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1891,31 +1891,9 @@ namespace OpenSim.Region.Framework.Scenes
1891 /// true if the object was added, false if an object with the same uuid was already in the scene 1891 /// true if the object was added, false if an object with the same uuid was already in the scene
1892 /// </returns> 1892 /// </returns>
1893 public bool AddRestoredSceneObject( 1893 public bool AddRestoredSceneObject(
1894 SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted, bool sendClientUpdates)
1895 {
1896 return m_sceneGraph.AddRestoredSceneObject(sceneObject, attachToBackup, alreadyPersisted, sendClientUpdates);
1897 }
1898
1899 /// <summary>
1900 /// Add an object into the scene that has come from storage
1901 /// </summary>
1902 ///
1903 /// <param name="sceneObject"></param>
1904 /// <param name="attachToBackup">
1905 /// If true, changes to the object will be reflected in its persisted data
1906 /// If false, the persisted data will not be changed even if the object in the scene is changed
1907 /// </param>
1908 /// <param name="alreadyPersisted">
1909 /// If true, we won't persist this object until it changes
1910 /// If false, we'll persist this object immediately
1911 /// </param>
1912 /// <returns>
1913 /// true if the object was added, false if an object with the same uuid was already in the scene
1914 /// </returns>
1915 public bool AddRestoredSceneObject(
1916 SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted) 1894 SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted)
1917 { 1895 {
1918 return AddRestoredSceneObject(sceneObject, attachToBackup, alreadyPersisted, true); 1896 return m_sceneGraph.AddRestoredSceneObject(sceneObject, attachToBackup, alreadyPersisted);
1919 } 1897 }
1920 1898
1921 /// <summary> 1899 /// <summary>
@@ -2528,7 +2506,7 @@ namespace OpenSim.Region.Framework.Scenes
2528 /// <returns></returns> 2506 /// <returns></returns>
2529 public bool IncomingCreateObject(ISceneObject sog) 2507 public bool IncomingCreateObject(ISceneObject sog)
2530 { 2508 {
2531 m_log.Debug(" >>> IncomingCreateObject(sog) <<< " + ((SceneObjectGroup)sog).AbsolutePosition + " deleted? " + ((SceneObjectGroup)sog).IsDeleted); 2509 //m_log.Debug(" >>> IncomingCreateObject(sog) <<< " + ((SceneObjectGroup)sog).AbsolutePosition + " deleted? " + ((SceneObjectGroup)sog).IsDeleted);
2532 SceneObjectGroup newObject; 2510 SceneObjectGroup newObject;
2533 try 2511 try
2534 { 2512 {
@@ -2600,12 +2578,10 @@ namespace OpenSim.Region.Framework.Scenes
2600 2578
2601 if (sceneObject.IsAttachmentCheckFull()) // Attachment 2579 if (sceneObject.IsAttachmentCheckFull()) // Attachment
2602 { 2580 {
2603 m_log.DebugFormat("[SCENE]: Adding attachment {0} {1}", sceneObject.Name, sceneObject.LocalId);
2604
2605 sceneObject.RootPart.AddFlag(PrimFlags.TemporaryOnRez); 2581 sceneObject.RootPart.AddFlag(PrimFlags.TemporaryOnRez);
2606 sceneObject.RootPart.AddFlag(PrimFlags.Phantom); 2582 sceneObject.RootPart.AddFlag(PrimFlags.Phantom);
2607 2583
2608 AddRestoredSceneObject(sceneObject, false, false, false); 2584 AddRestoredSceneObject(sceneObject, false, false);
2609 2585
2610 // Handle attachment special case 2586 // Handle attachment special case
2611 SceneObjectPart RootPrim = sceneObject.RootPart; 2587 SceneObjectPart RootPrim = sceneObject.RootPart;
@@ -2613,8 +2589,6 @@ namespace OpenSim.Region.Framework.Scenes
2613 // Fix up attachment Parent Local ID 2589 // Fix up attachment Parent Local ID
2614 ScenePresence sp = GetScenePresence(sceneObject.OwnerID); 2590 ScenePresence sp = GetScenePresence(sceneObject.OwnerID);
2615 2591
2616 Console.WriteLine("AAAA");
2617
2618 //uint parentLocalID = 0; 2592 //uint parentLocalID = 0;
2619 if (sp != null) 2593 if (sp != null)
2620 { 2594 {
@@ -2633,25 +2607,20 @@ namespace OpenSim.Region.Framework.Scenes
2633 //grp.SetFromAssetID(grp.RootPart.LastOwnerID); 2607 //grp.SetFromAssetID(grp.RootPart.LastOwnerID);
2634 m_log.DebugFormat( 2608 m_log.DebugFormat(
2635 "[ATTACHMENT]: Attach to avatar {0} at position {1}", sp.UUID, grp.AbsolutePosition); 2609 "[ATTACHMENT]: Attach to avatar {0} at position {1}", sp.UUID, grp.AbsolutePosition);
2636 2610
2637 RootPrim.RemFlag(PrimFlags.TemporaryOnRez);
2638 AttachObject( 2611 AttachObject(
2639 sp.ControllingClient, grp.LocalId, (uint)0, grp.GroupRotation, grp.AbsolutePosition, false); 2612 sp.ControllingClient, grp.LocalId, (uint)0, grp.GroupRotation, grp.AbsolutePosition, false);
2640 2613 RootPrim.RemFlag(PrimFlags.TemporaryOnRez);
2641 //grp.SendGroupFullUpdate(); 2614 grp.SendGroupFullUpdate();
2642 } 2615 }
2643 else 2616 else
2644 { 2617 {
2645 RootPrim.RemFlag(PrimFlags.TemporaryOnRez); 2618 RootPrim.RemFlag(PrimFlags.TemporaryOnRez);
2646 RootPrim.AddFlag(PrimFlags.TemporaryOnRez); 2619 RootPrim.AddFlag(PrimFlags.TemporaryOnRez);
2647 } 2620 }
2648
2649 Console.WriteLine("BBBB");
2650 } 2621 }
2651 else 2622 else
2652 { 2623 {
2653 m_log.DebugFormat("[SCENE]: Adding ordinary object {0} {1}", sceneObject.Name, sceneObject.LocalId);
2654
2655 AddRestoredSceneObject(sceneObject, true, false); 2624 AddRestoredSceneObject(sceneObject, true, false);
2656 2625
2657 if (!Permissions.CanObjectEntry(sceneObject.UUID, 2626 if (!Permissions.CanObjectEntry(sceneObject.UUID,