Fix a number of errors in transfer of objects

0.6.0-stable
Melanie Thielker 2008-10-06 06:08:45 +00:00
parent 195893b06d
commit 1b678f062a
3 changed files with 16 additions and 5 deletions

View File

@ -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);
}
}

View File

@ -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;

View File

@ -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();