Fix rezzing coalesced object broken by core merge

avinationmerge
Melanie 2011-10-12 00:50:13 +02:00
parent 1c2b5d99c9
commit 59e3ac1ec6
1 changed files with 36 additions and 54 deletions

View File

@ -786,10 +786,10 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
if (item != null && !DoPreRezWhenFromItem(remoteClient, item, objlist, pos, attachment)) if (item != null && !DoPreRezWhenFromItem(remoteClient, item, objlist, pos, attachment))
return null; return null;
SceneObjectPart rootPart = group.RootPart;
for (int i = 0; i < objlist.Count; i++) for (int i = 0; i < objlist.Count; i++)
{ {
group = objlist[i]; group = objlist[i];
SceneObjectPart rootPart = group.RootPart;
// Vector3 storedPosition = group.AbsolutePosition; // Vector3 storedPosition = group.AbsolutePosition;
if (group.UUID == UUID.Zero) if (group.UUID == UUID.Zero)
@ -854,16 +854,6 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
rootPart.ScheduleFullUpdate(); rootPart.ScheduleFullUpdate();
} }
// m_log.DebugFormat(
// "[InventoryAccessModule]: Rezzed {0} {1} {2} for {3}",
// group.Name, group.LocalId, group.UUID, remoteClient.Name);
}
group.SetGroup(remoteClient.ActiveGroupId, remoteClient);
// TODO: Remove the magic number badness
if (item != null)
DoPostRezWhenFromItem(item, attachment);
if ((rootPart.OwnerID != item.Owner) || if ((rootPart.OwnerID != item.Owner) ||
(item.CurrentPermissions & 16) != 0 || // Magic number (item.CurrentPermissions & 16) != 0 || // Magic number
(item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0) (item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0)
@ -897,24 +887,16 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
group.ApplyNextOwnerPermissions(); group.ApplyNextOwnerPermissions();
} }
} }
foreach (SceneObjectPart part in group.Parts)
{ // m_log.DebugFormat(
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteEveryone) != 0) // "[InventoryAccessModule]: Rezzed {0} {1} {2} for {3}",
part.EveryoneMask = item.EveryOnePermissions; // group.Name, group.LocalId, group.UUID, remoteClient.Name);
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteNextOwner) != 0)
part.NextOwnerMask = item.NextPermissions;
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteGroup) != 0)
part.GroupMask = item.GroupPermissions;
} }
if ((rootPart.OwnerID != item.Owner) || group.SetGroup(remoteClient.ActiveGroupId, remoteClient);
(item.CurrentPermissions & 16) != 0 || // Magic number // TODO: Remove the magic number badness
(item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0) if (item != null)
{ DoPostRezWhenFromItem(item, attachment);
//Need to kill the for sale here
rootPart.ObjectSaleType = 0;
rootPart.SalePrice = 10;
}
return group; return group;
} }