From 4486b7d8e8aaa7f98e0003ce06fc0e145903f6b9 Mon Sep 17 00:00:00 2001 From: PixelTomsen Date: Thu, 16 Feb 2012 00:07:12 +0100 Subject: Fix: Object owned by the group does not return to the last owner http://opensimulator.org/mantis/view.php?id=5404 --- .../CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | 6 ++++++ OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 2 +- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 63ba3d3..5da15ff 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs @@ -552,6 +552,12 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess // action, remoteClient.Name, userID); } else + if (so.RootPart.OwnerID == so.RootPart.GroupID) + { + // Group owned objects go to the last owner + userID = so.RootPart.LastOwnerID; + } + else { // All returns / deletes go to the object owner // diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 5a5307c..9d9729e 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -1926,7 +1926,7 @@ namespace OpenSim.Region.Framework.Scenes foreach (SceneObjectGroup g in deleteGroups) { - AddReturn(g.OwnerID, g.Name, g.AbsolutePosition, "parcel owner return"); + AddReturn(g.OwnerID == g.GroupID ? g.LastOwnerID : g.OwnerID, g.Name, g.AbsolutePosition, "parcel owner return"); } } } diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 5b838f8..878476e 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -1330,7 +1330,7 @@ namespace OpenSim.Region.Framework.Scenes m_log.DebugFormat( "[SCENE OBJECT GROUP]: Returning object {0} due to parcel autoreturn", RootPart.UUID); - m_scene.AddReturn(OwnerID, Name, AbsolutePosition, "parcel autoreturn"); + m_scene.AddReturn(OwnerID == GroupID ? LastOwnerID : OwnerID, Name, AbsolutePosition, "parcel autoreturn"); m_scene.DeRezObjects(null, new List() { RootPart.LocalId }, UUID.Zero, DeRezAction.Return, UUID.Zero); -- cgit v1.1