diff options
author | Melanie | 2010-07-17 03:09:27 +0100 |
---|---|---|
committer | Melanie | 2010-07-17 03:09:27 +0100 |
commit | 6f591376dd22c05d297dec6e5fe0d78e47a7d0ff (patch) | |
tree | 52ba1d530eef192274471b212afe1fdec7715cb8 /OpenSim/Region/Framework/Scenes/Scene.cs | |
parent | Merge branch '0.6.9-post-fixes' into careminster (diff) | |
parent | Stop occasional permanently high 100% utilization when the server is started ... (diff) | |
download | opensim-SC-6f591376dd22c05d297dec6e5fe0d78e47a7d0ff.zip opensim-SC-6f591376dd22c05d297dec6e5fe0d78e47a7d0ff.tar.gz opensim-SC-6f591376dd22c05d297dec6e5fe0d78e47a7d0ff.tar.bz2 opensim-SC-6f591376dd22c05d297dec6e5fe0d78e47a7d0ff.tar.xz |
Merge branch '0.6.9-post-fixes' into careminster
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 43 |
1 files changed, 37 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 4bd3222..221eb47 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1891,9 +1891,31 @@ 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( | ||
1894 | SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted) | 1916 | SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted) |
1895 | { | 1917 | { |
1896 | return m_sceneGraph.AddRestoredSceneObject(sceneObject, attachToBackup, alreadyPersisted); | 1918 | return AddRestoredSceneObject(sceneObject, attachToBackup, alreadyPersisted, true); |
1897 | } | 1919 | } |
1898 | 1920 | ||
1899 | /// <summary> | 1921 | /// <summary> |
@@ -2506,7 +2528,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2506 | /// <returns></returns> | 2528 | /// <returns></returns> |
2507 | public bool IncomingCreateObject(ISceneObject sog) | 2529 | public bool IncomingCreateObject(ISceneObject sog) |
2508 | { | 2530 | { |
2509 | //m_log.Debug(" >>> IncomingCreateObject(sog) <<< " + ((SceneObjectGroup)sog).AbsolutePosition + " deleted? " + ((SceneObjectGroup)sog).IsDeleted); | 2531 | // m_log.Debug(" >>> IncomingCreateObject(sog) <<< " + ((SceneObjectGroup)sog).AbsolutePosition + " deleted? " + ((SceneObjectGroup)sog).IsDeleted); |
2510 | SceneObjectGroup newObject; | 2532 | SceneObjectGroup newObject; |
2511 | try | 2533 | try |
2512 | { | 2534 | { |
@@ -2578,10 +2600,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
2578 | 2600 | ||
2579 | if (sceneObject.IsAttachmentCheckFull()) // Attachment | 2601 | if (sceneObject.IsAttachmentCheckFull()) // Attachment |
2580 | { | 2602 | { |
2603 | // m_log.DebugFormat("[SCENE]: Adding attachment {0} {1}", sceneObject.Name, sceneObject.LocalId); | ||
2604 | |||
2581 | sceneObject.RootPart.AddFlag(PrimFlags.TemporaryOnRez); | 2605 | sceneObject.RootPart.AddFlag(PrimFlags.TemporaryOnRez); |
2582 | sceneObject.RootPart.AddFlag(PrimFlags.Phantom); | 2606 | sceneObject.RootPart.AddFlag(PrimFlags.Phantom); |
2583 | 2607 | ||
2584 | AddRestoredSceneObject(sceneObject, false, false); | 2608 | AddRestoredSceneObject(sceneObject, false, false, false); |
2585 | 2609 | ||
2586 | // Handle attachment special case | 2610 | // Handle attachment special case |
2587 | SceneObjectPart RootPrim = sceneObject.RootPart; | 2611 | SceneObjectPart RootPrim = sceneObject.RootPart; |
@@ -2589,6 +2613,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2589 | // Fix up attachment Parent Local ID | 2613 | // Fix up attachment Parent Local ID |
2590 | ScenePresence sp = GetScenePresence(sceneObject.OwnerID); | 2614 | ScenePresence sp = GetScenePresence(sceneObject.OwnerID); |
2591 | 2615 | ||
2616 | // Console.WriteLine("AAAA"); | ||
2617 | |||
2592 | //uint parentLocalID = 0; | 2618 | //uint parentLocalID = 0; |
2593 | if (sp != null) | 2619 | if (sp != null) |
2594 | { | 2620 | { |
@@ -2607,20 +2633,25 @@ namespace OpenSim.Region.Framework.Scenes | |||
2607 | //grp.SetFromAssetID(grp.RootPart.LastOwnerID); | 2633 | //grp.SetFromAssetID(grp.RootPart.LastOwnerID); |
2608 | m_log.DebugFormat( | 2634 | m_log.DebugFormat( |
2609 | "[ATTACHMENT]: Attach to avatar {0} at position {1}", sp.UUID, grp.AbsolutePosition); | 2635 | "[ATTACHMENT]: Attach to avatar {0} at position {1}", sp.UUID, grp.AbsolutePosition); |
2610 | 2636 | ||
2637 | RootPrim.RemFlag(PrimFlags.TemporaryOnRez); | ||
2611 | AttachObject( | 2638 | AttachObject( |
2612 | sp.ControllingClient, grp.LocalId, (uint)0, grp.GroupRotation, grp.AbsolutePosition, false); | 2639 | sp.ControllingClient, grp.LocalId, (uint)0, grp.GroupRotation, grp.AbsolutePosition, false); |
2613 | RootPrim.RemFlag(PrimFlags.TemporaryOnRez); | 2640 | |
2614 | grp.SendGroupFullUpdate(); | 2641 | //grp.SendGroupFullUpdate(); |
2615 | } | 2642 | } |
2616 | else | 2643 | else |
2617 | { | 2644 | { |
2618 | RootPrim.RemFlag(PrimFlags.TemporaryOnRez); | 2645 | RootPrim.RemFlag(PrimFlags.TemporaryOnRez); |
2619 | RootPrim.AddFlag(PrimFlags.TemporaryOnRez); | 2646 | RootPrim.AddFlag(PrimFlags.TemporaryOnRez); |
2620 | } | 2647 | } |
2648 | |||
2649 | // Console.WriteLine("BBBB"); | ||
2621 | } | 2650 | } |
2622 | else | 2651 | else |
2623 | { | 2652 | { |
2653 | // m_log.DebugFormat("[SCENE]: Adding ordinary object {0} {1}", sceneObject.Name, sceneObject.LocalId); | ||
2654 | |||
2624 | AddRestoredSceneObject(sceneObject, true, false); | 2655 | AddRestoredSceneObject(sceneObject, true, false); |
2625 | 2656 | ||
2626 | if (!Permissions.CanObjectEntry(sceneObject.UUID, | 2657 | if (!Permissions.CanObjectEntry(sceneObject.UUID, |