mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
Use scene presence agent id for rezzed object ownership rather than item owner.
These should be identical. However, the item isn't available when rezzing npc attachments.
This commit is contained in:
@@ -724,8 +724,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||
SceneObjectGroup group = null;
|
||||
|
||||
string xmlData = Utils.BytesToString(rezAsset.Data);
|
||||
List<SceneObjectGroup> objlist =
|
||||
new List<SceneObjectGroup>();
|
||||
List<SceneObjectGroup> objlist = new List<SceneObjectGroup>();
|
||||
List<Vector3> veclist = new List<Vector3>();
|
||||
byte bRayEndIsIntersection = (byte)(RayEndIsIntersection ? 1 : 0);
|
||||
Vector3 pos;
|
||||
@@ -797,6 +796,13 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||
m_log.Debug("[InventoryAccessModule]: Object has UUID.Zero! Position 3");
|
||||
}
|
||||
|
||||
foreach (SceneObjectPart part in group.Parts)
|
||||
{
|
||||
// Make the rezzer the owner, as this is not necessarily set correctly in the serialized asset.
|
||||
part.LastOwnerID = part.OwnerID;
|
||||
part.OwnerID = remoteClient.AgentId;
|
||||
}
|
||||
|
||||
if (!attachment)
|
||||
{
|
||||
// If it's rezzed in world, select it. Much easier to
|
||||
@@ -833,13 +839,13 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||
group.AbsolutePosition = pos + veclist[i];
|
||||
}
|
||||
|
||||
SceneObjectPart rootPart = group.RootPart;
|
||||
|
||||
group.SetGroup(remoteClient.ActiveGroupId, remoteClient);
|
||||
|
||||
if (!attachment)
|
||||
{
|
||||
if (group.RootPart.Shape.PCode == (byte)PCode.Prim)
|
||||
SceneObjectPart rootPart = group.RootPart;
|
||||
|
||||
if (rootPart.Shape.PCode == (byte)PCode.Prim)
|
||||
group.ClearPartAttachmentData();
|
||||
|
||||
// Fire on_rez
|
||||
@@ -963,11 +969,10 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||
if ((part.OwnerID != item.Owner) ||
|
||||
(item.CurrentPermissions & 16) != 0)
|
||||
{
|
||||
part.LastOwnerID = part.OwnerID;
|
||||
part.OwnerID = item.Owner;
|
||||
part.Inventory.ChangeInventoryOwner(item.Owner);
|
||||
part.GroupMask = 0; // DO NOT propagate here
|
||||
}
|
||||
|
||||
part.EveryoneMask = item.EveryOnePermissions;
|
||||
part.NextOwnerMask = item.NextPermissions;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user