From 623a2f859ff66f5b4f7e1bcb42d28509b66a02e2 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 20 Jun 2016 10:05:17 -0700 Subject: [PATCH] Mantis #7929: objects deeded to the group were loosing some important properties. This makes the "For sale" be visible, but is not the end of the story. --- .../Region/Framework/Scenes/Scene.Inventory.cs | 15 +++++++++------ .../Region/Framework/Scenes/SceneObjectGroup.cs | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index b77b860ed8..bcc0cea2e4 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -2729,7 +2729,7 @@ namespace OpenSim.Region.Framework.Scenes child.TriggerScriptChangedEvent(Changed.OWNER); } } - else + else // The object was deeded to the group { if (!Permissions.IsGod(remoteClient.AgentId) && sog.OwnerID != remoteClient.AgentId) continue; @@ -2739,18 +2739,21 @@ namespace OpenSim.Region.Framework.Scenes if (sog.GroupID != groupID) continue; - - SceneObjectPart[] partList = sog.Parts; + sog.SetOwnerId(groupID); + // Make the group mask be the previous owner mask + sog.RootPart.GroupMask = sog.RootPart.OwnerMask; + + sog.ScheduleGroupForFullUpdate(); + + SceneObjectPart[] partList = sog.Parts; foreach (SceneObjectPart child in partList) { - child.LastOwnerID = child.OwnerID; child.Inventory.ChangeInventoryOwner(groupID); child.TriggerScriptChangedEvent(Changed.OWNER); } - sog.SetOwnerId(groupID); - sog.ApplyNextOwnerPermissions(); + } } diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 0385582b50..dc5f8699f6 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -2125,7 +2125,7 @@ namespace OpenSim.Region.Framework.Scenes { ForEachPart(delegate(SceneObjectPart part) { - + part.LastOwnerID = part.OwnerID; part.OwnerID = userId; });