From 44ce068d6cd8afe3780b26f77d2a1b39ac81ef44 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 11 Mar 2012 18:21:47 +0100 Subject: Allow RLV to redirect received folders to #RLV folder --- .../Inventory/Transfer/InventoryTransferModule.cs | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs index da708d2..80554fb 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs @@ -268,6 +268,39 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer else if (im.dialog == (byte) InstantMessageDialog.InventoryAccepted || im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted) { + UUID inventoryID = new UUID(im.imSessionID); // The inventory item/folder, back from it's trip + IInventoryService invService = scene.InventoryService; + + // Special case: folder redirect. + // RLV uses this + if (im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted) + { + InventoryFolderBase folder = new InventoryFolderBase(inventoryID, client.AgentId); + folder = invService.GetFolder(folder); + + if (folder != null) + { + if (im.binaryBucket.Length >= 16) + { + UUID destFolderID = new UUID(im.binaryBucket, 0); + if (destFolderID != UUID.Zero) + { + InventoryFolderBase destFolder = new InventoryFolderBase(destFolderID, client.AgentId); + destFolder = invService.GetFolder(destFolder); + if (destFolder != null) + { + if (folder.ParentID != destFolder.ID) + { + folder.ParentID = destFolder.ID; + invService.MoveFolder(folder); + client.SendBulkUpdateInventory(folder); + } + } + } + } + } + } + ScenePresence user = scene.GetScenePresence(new UUID(im.toAgentID)); if (user != null) // Local -- cgit v1.1 From 2a17dafa0463ff5699adca3f5cfe56a91de50e04 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 12 Mar 2012 06:52:03 +0000 Subject: missing file in ubitODE --- OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs index b111172..612eafd 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs +++ b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs @@ -128,6 +128,7 @@ namespace OpenSim.Region.Physics.OdePlugin VolumeDtc, Physical, + Phantom, Selected, disabled, building, -- cgit v1.1 From b5e172677dfed6a9b6ec60c86aea687f46543ec7 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 12 Mar 2012 07:46:20 +0000 Subject: ubitode prim select was not doing phantom case --- OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs index 5d8f03c..39b89d3 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs @@ -2487,14 +2487,25 @@ namespace OpenSim.Region.Physics.OdePlugin if (!childPrim && Body != IntPtr.Zero && !m_disabled) d.BodyEnable(Body); - m_collisionCategories = CollisionCategories.Geom; - if (m_isphysical) - m_collisionCategories |= CollisionCategories.Body; + if (m_isphantom && !m_isVolumeDetect) + { + m_collisionCategories = 0; + if(m_isphysical) + m_collisionFlags = CollisionCategories.Land; + else + m_collisionFlags = 0; + } + else + { + m_collisionCategories = CollisionCategories.Geom; + if (m_isphysical) + m_collisionCategories |= CollisionCategories.Body; - m_collisionFlags = m_default_collisionFlags | CollisionCategories.Land; + m_collisionFlags = m_default_collisionFlags | CollisionCategories.Land; - if (m_collidesWater) - m_collisionFlags |= CollisionCategories.Water; + if (m_collidesWater) + m_collisionFlags |= CollisionCategories.Water; + } if (!childPrim) { -- cgit v1.1 From a35e00e81eba1d3b0990c9c8139d77d34d6cbb7e Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 12 Mar 2012 07:50:14 +0000 Subject: allocate UndoRedoStore only on demand --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 27 ++++++++++++++-------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index a17862e..94e4560 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -263,7 +263,7 @@ namespace OpenSim.Region.Framework.Scenes private bool m_occupied; // KF if any av is sitting on this prim private string m_text = String.Empty; private string m_touchName = String.Empty; - private UndoRedoState m_UndoRedo = new UndoRedoState(5); + private UndoRedoState m_UndoRedo = null; private bool m_passTouches; @@ -1706,7 +1706,7 @@ namespace OpenSim.Region.Framework.Scenes dupe.Category = Category; dupe.m_rezzed = m_rezzed; - dupe.m_UndoRedo = new UndoRedoState(5); + dupe.m_UndoRedo = null; dupe.IgnoreUndoUpdate = false; dupe.Undoing = false; @@ -3646,6 +3646,9 @@ namespace OpenSim.Region.Framework.Scenes public void StoreUndoState(ObjectChangeWhat what) { + if (m_UndoRedo == null) + m_UndoRedo = new UndoRedoState(5); + lock (m_UndoRedo) { if (!Undoing && !IgnoreUndoUpdate && ParentGroup != null) // just to read better - undo is in progress, or suspended @@ -3662,18 +3665,19 @@ namespace OpenSim.Region.Framework.Scenes { get { - lock (m_UndoRedo) - return m_UndoRedo.Count; + if (m_UndoRedo == null) + return 0; + return m_UndoRedo.Count; } } public void Undo() { + if (m_UndoRedo == null || Undoing || ParentGroup == null) + return; + lock (m_UndoRedo) { - if (Undoing || ParentGroup == null) - return; - Undoing = true; m_UndoRedo.Undo(this); Undoing = false; @@ -3682,11 +3686,11 @@ namespace OpenSim.Region.Framework.Scenes public void Redo() { + if (m_UndoRedo == null || Undoing || ParentGroup == null) + return; + lock (m_UndoRedo) { - if (Undoing || ParentGroup == null) - return; - Undoing = true; m_UndoRedo.Redo(this); Undoing = false; @@ -3695,6 +3699,9 @@ namespace OpenSim.Region.Framework.Scenes public void ClearUndoState() { + if (m_UndoRedo == null || Undoing) + return; + lock (m_UndoRedo) { m_UndoRedo.Clear(); -- cgit v1.1