Fix rezzing coalesced object broken by core merge
parent
1c2b5d99c9
commit
59e3ac1ec6
|
@ -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,6 +854,40 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||||
rootPart.ScheduleFullUpdate();
|
rootPart.ScheduleFullUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((rootPart.OwnerID != item.Owner) ||
|
||||||
|
(item.CurrentPermissions & 16) != 0 || // Magic number
|
||||||
|
(item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0)
|
||||||
|
{
|
||||||
|
//Need to kill the for sale here
|
||||||
|
rootPart.ObjectSaleType = 0;
|
||||||
|
rootPart.SalePrice = 10;
|
||||||
|
|
||||||
|
if (m_Scene.Permissions.PropagatePermissions())
|
||||||
|
{
|
||||||
|
foreach (SceneObjectPart part in group.Parts)
|
||||||
|
{
|
||||||
|
if ((item.Flags & (uint)InventoryItemFlags.ObjectHasMultipleItems) == 0)
|
||||||
|
{
|
||||||
|
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteEveryone) != 0)
|
||||||
|
part.EveryoneMask = item.EveryOnePermissions;
|
||||||
|
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteNextOwner) != 0)
|
||||||
|
part.NextOwnerMask = item.NextPermissions;
|
||||||
|
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteGroup) != 0)
|
||||||
|
part.GroupMask = item.GroupPermissions;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (SceneObjectPart part in group.Parts)
|
||||||
|
{
|
||||||
|
part.LastOwnerID = part.OwnerID;
|
||||||
|
part.OwnerID = item.Owner;
|
||||||
|
part.Inventory.ChangeInventoryOwner(item.Owner);
|
||||||
|
}
|
||||||
|
|
||||||
|
group.ApplyNextOwnerPermissions();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// m_log.DebugFormat(
|
// m_log.DebugFormat(
|
||||||
// "[InventoryAccessModule]: Rezzed {0} {1} {2} for {3}",
|
// "[InventoryAccessModule]: Rezzed {0} {1} {2} for {3}",
|
||||||
// group.Name, group.LocalId, group.UUID, remoteClient.Name);
|
// group.Name, group.LocalId, group.UUID, remoteClient.Name);
|
||||||
|
@ -864,58 +898,6 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||||
if (item != null)
|
if (item != null)
|
||||||
DoPostRezWhenFromItem(item, attachment);
|
DoPostRezWhenFromItem(item, attachment);
|
||||||
|
|
||||||
if ((rootPart.OwnerID != item.Owner) ||
|
|
||||||
(item.CurrentPermissions & 16) != 0 || // Magic number
|
|
||||||
(item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0)
|
|
||||||
{
|
|
||||||
//Need to kill the for sale here
|
|
||||||
rootPart.ObjectSaleType = 0;
|
|
||||||
rootPart.SalePrice = 10;
|
|
||||||
|
|
||||||
if (m_Scene.Permissions.PropagatePermissions())
|
|
||||||
{
|
|
||||||
foreach (SceneObjectPart part in group.Parts)
|
|
||||||
{
|
|
||||||
if ((item.Flags & (uint)InventoryItemFlags.ObjectHasMultipleItems) == 0)
|
|
||||||
{
|
|
||||||
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteEveryone) != 0)
|
|
||||||
part.EveryoneMask = item.EveryOnePermissions;
|
|
||||||
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteNextOwner) != 0)
|
|
||||||
part.NextOwnerMask = item.NextPermissions;
|
|
||||||
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteGroup) != 0)
|
|
||||||
part.GroupMask = item.GroupPermissions;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (SceneObjectPart part in group.Parts)
|
|
||||||
{
|
|
||||||
part.LastOwnerID = part.OwnerID;
|
|
||||||
part.OwnerID = item.Owner;
|
|
||||||
part.Inventory.ChangeInventoryOwner(item.Owner);
|
|
||||||
}
|
|
||||||
|
|
||||||
group.ApplyNextOwnerPermissions();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach (SceneObjectPart part in group.Parts)
|
|
||||||
{
|
|
||||||
if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteEveryone) != 0)
|
|
||||||
part.EveryoneMask = item.EveryOnePermissions;
|
|
||||||
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) ||
|
|
||||||
(item.CurrentPermissions & 16) != 0 || // Magic number
|
|
||||||
(item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0)
|
|
||||||
{
|
|
||||||
//Need to kill the for sale here
|
|
||||||
rootPart.ObjectSaleType = 0;
|
|
||||||
rootPart.SalePrice = 10;
|
|
||||||
}
|
|
||||||
|
|
||||||
return group;
|
return group;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1165,4 +1147,4 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue