From 1b678f062a0129fb2bb457666a67361f8bc218f0 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 6 Oct 2008 06:08:45 +0000 Subject: Fix a number of errors in transfer of objects --- OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 1 + OpenSim/Region/Environment/Scenes/Scene.cs | 1 + OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 19 ++++++++++++++----- 3 files changed, 16 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes') diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 04076da..ecc6180 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs @@ -2352,6 +2352,7 @@ namespace OpenSim.Region.Environment.Scenes if (part != null && part.ParentGroup != null) { part.ParentGroup.SetOwnerId(ownerID); + part.ChangeInventoryOwner(ownerID); part.ParentGroup.SetGroup(groupID, remoteClient); } } diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 735de7e..b6c9754 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -4116,6 +4116,7 @@ namespace OpenSim.Region.Environment.Scenes { foreach (SceneObjectPart child in partList) { + child.ChangeInventoryOwner(remoteClient.AgentId); child.OwnerMask &= child.NextOwnerMask; child.GroupMask &= child.NextOwnerMask; child.EveryoneMask &= child.NextOwnerMask; diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 80c4259..91249f9 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -3026,23 +3026,32 @@ namespace OpenSim.Region.Environment.Scenes public void UpdatePermissions(UUID AgentID, byte field, uint localID, uint mask, byte addRemTF) { bool set = addRemTF == 1; + bool god = m_parentGroup.Scene.ExternalChecks.ExternalChecksCanBeGodLike(AgentID); + + uint baseMask = _baseMask; + if (god) + baseMask = 0x7ffffff0; // Are we the owner? - if (AgentID == _ownerID) + if ((AgentID == _ownerID) || god) { switch (field) { case 2: - _ownerMask = ApplyMask(_ownerMask, set, mask); + _ownerMask = ApplyMask(_ownerMask, set, mask) & + baseMask; break; case 4: - _groupMask = ApplyMask(_groupMask, set, mask); + _groupMask = ApplyMask(_groupMask, set, mask) & + baseMask; break; case 8: - _everyoneMask = ApplyMask(_everyoneMask, set, mask); + _everyoneMask = ApplyMask(_everyoneMask, set, mask) & + baseMask; break; case 16: - _nextOwnerMask = ApplyMask(_nextOwnerMask, set, mask); + _nextOwnerMask = ApplyMask(_nextOwnerMask, set, mask) & + baseMask; break; } SendFullUpdateToAllClients(); -- cgit v1.1