Adapt CM to the new CHANGED_OWNER handling
parent
9f8acbfe3e
commit
8766401777
|
@ -245,7 +245,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
|||
objatt.HasGroupChanged = true;
|
||||
|
||||
if (doc != null)
|
||||
{
|
||||
objatt.LoadScriptState(doc);
|
||||
objatt.ResetOwnerChangeFlag();
|
||||
}
|
||||
|
||||
// Fire after attach, so we don't get messy perms dialogs
|
||||
// 3 == AttachedRez
|
||||
|
|
|
@ -3931,5 +3931,13 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
return priority;
|
||||
}
|
||||
|
||||
public void ResetOwnerChangeFlag()
|
||||
{
|
||||
ForEachPart(delegate(SceneObjectPart part)
|
||||
{
|
||||
part.ResetOwnerChangeFlag();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4683,5 +4683,17 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
return new Color4((byte)Color.R, (byte)Color.G, (byte)Color.B, (byte)(0xFF - Color.A));
|
||||
}
|
||||
|
||||
public void ResetOwnerChangeFlag()
|
||||
{
|
||||
List<UUID> inv = Inventory.GetInventoryList();
|
||||
|
||||
foreach (UUID itemID in inv)
|
||||
{
|
||||
TaskInventoryItem item = Inventory.GetInventoryItem(itemID);
|
||||
item.OwnerChanged = false;
|
||||
Inventory.UpdateInventoryItem(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4011,15 +4011,24 @@ Console.WriteLine("Scripted Sit ofset {0}", m_pos);
|
|||
{
|
||||
string xmlData;
|
||||
XmlDocument d = new XmlDocument();
|
||||
UUID asset;
|
||||
if (itemData.TryGetValue(itemID, out xmlData))
|
||||
{
|
||||
d.LoadXml(xmlData);
|
||||
m_log.InfoFormat("[ATTACHMENT]: Found saved state for item {0}, loading it", itemID);
|
||||
}
|
||||
|
||||
// Rez from inventory
|
||||
UUID asset
|
||||
= m_scene.AttachmentsModule.RezSingleAttachmentFromInventory(ControllingClient, itemID, (uint)p, true, d);
|
||||
// Rez from inventory
|
||||
asset
|
||||
= m_scene.AttachmentsModule.RezSingleAttachmentFromInventory(ControllingClient, itemID, (uint)p, true, d);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// Rez from inventory (with a null doc to let
|
||||
// CHANGED_OWNER happen)
|
||||
asset
|
||||
= m_scene.AttachmentsModule.RezSingleAttachmentFromInventory(ControllingClient, itemID, (uint)p, true, null);
|
||||
}
|
||||
|
||||
m_log.InfoFormat(
|
||||
"[ATTACHMENT]: Rezzed attachment in point {0} from item {1} and asset {2} ({3})",
|
||||
|
|
Loading…
Reference in New Issue