diff options
author | Melanie Thielker | 2010-05-03 04:28:30 +0200 |
---|---|---|
committer | Melanie Thielker | 2010-05-03 04:28:30 +0200 |
commit | 87664017773227d07b39382efa2aa94f22bbe6c6 (patch) | |
tree | 9ec56ad5d49d04720e54573791f1a88fcbefa476 /OpenSim/Region | |
parent | Merge branch 'master' into careminster-presence-refactor (diff) | |
download | opensim-SC_OLD-87664017773227d07b39382efa2aa94f22bbe6c6.zip opensim-SC_OLD-87664017773227d07b39382efa2aa94f22bbe6c6.tar.gz opensim-SC_OLD-87664017773227d07b39382efa2aa94f22bbe6c6.tar.bz2 opensim-SC_OLD-87664017773227d07b39382efa2aa94f22bbe6c6.tar.xz |
Adapt CM to the new CHANGED_OWNER handling
Diffstat (limited to 'OpenSim/Region')
4 files changed, 36 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 1992bd4..4fac01f 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -245,7 +245,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
245 | objatt.HasGroupChanged = true; | 245 | objatt.HasGroupChanged = true; |
246 | 246 | ||
247 | if (doc != null) | 247 | if (doc != null) |
248 | { | ||
248 | objatt.LoadScriptState(doc); | 249 | objatt.LoadScriptState(doc); |
250 | objatt.ResetOwnerChangeFlag(); | ||
251 | } | ||
249 | 252 | ||
250 | // Fire after attach, so we don't get messy perms dialogs | 253 | // Fire after attach, so we don't get messy perms dialogs |
251 | // 3 == AttachedRez | 254 | // 3 == AttachedRez |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 1c6f2d1..ff471e0 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -3931,5 +3931,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
3931 | 3931 | ||
3932 | return priority; | 3932 | return priority; |
3933 | } | 3933 | } |
3934 | |||
3935 | public void ResetOwnerChangeFlag() | ||
3936 | { | ||
3937 | ForEachPart(delegate(SceneObjectPart part) | ||
3938 | { | ||
3939 | part.ResetOwnerChangeFlag(); | ||
3940 | }); | ||
3941 | } | ||
3934 | } | 3942 | } |
3935 | } | 3943 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 4b2641c..48e65a5 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -4683,5 +4683,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
4683 | { | 4683 | { |
4684 | return new Color4((byte)Color.R, (byte)Color.G, (byte)Color.B, (byte)(0xFF - Color.A)); | 4684 | return new Color4((byte)Color.R, (byte)Color.G, (byte)Color.B, (byte)(0xFF - Color.A)); |
4685 | } | 4685 | } |
4686 | |||
4687 | public void ResetOwnerChangeFlag() | ||
4688 | { | ||
4689 | List<UUID> inv = Inventory.GetInventoryList(); | ||
4690 | |||
4691 | foreach (UUID itemID in inv) | ||
4692 | { | ||
4693 | TaskInventoryItem item = Inventory.GetInventoryItem(itemID); | ||
4694 | item.OwnerChanged = false; | ||
4695 | Inventory.UpdateInventoryItem(item); | ||
4696 | } | ||
4697 | } | ||
4686 | } | 4698 | } |
4687 | } | 4699 | } |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index ceb4395..562232c 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -4011,15 +4011,24 @@ Console.WriteLine("Scripted Sit ofset {0}", m_pos); | |||
4011 | { | 4011 | { |
4012 | string xmlData; | 4012 | string xmlData; |
4013 | XmlDocument d = new XmlDocument(); | 4013 | XmlDocument d = new XmlDocument(); |
4014 | UUID asset; | ||
4014 | if (itemData.TryGetValue(itemID, out xmlData)) | 4015 | if (itemData.TryGetValue(itemID, out xmlData)) |
4015 | { | 4016 | { |
4016 | d.LoadXml(xmlData); | 4017 | d.LoadXml(xmlData); |
4017 | m_log.InfoFormat("[ATTACHMENT]: Found saved state for item {0}, loading it", itemID); | 4018 | m_log.InfoFormat("[ATTACHMENT]: Found saved state for item {0}, loading it", itemID); |
4018 | } | ||
4019 | 4019 | ||
4020 | // Rez from inventory | 4020 | // Rez from inventory |
4021 | UUID asset | 4021 | asset |
4022 | = m_scene.AttachmentsModule.RezSingleAttachmentFromInventory(ControllingClient, itemID, (uint)p, true, d); | 4022 | = m_scene.AttachmentsModule.RezSingleAttachmentFromInventory(ControllingClient, itemID, (uint)p, true, d); |
4023 | |||
4024 | } | ||
4025 | else | ||
4026 | { | ||
4027 | // Rez from inventory (with a null doc to let | ||
4028 | // CHANGED_OWNER happen) | ||
4029 | asset | ||
4030 | = m_scene.AttachmentsModule.RezSingleAttachmentFromInventory(ControllingClient, itemID, (uint)p, true, null); | ||
4031 | } | ||
4023 | 4032 | ||
4024 | m_log.InfoFormat( | 4033 | m_log.InfoFormat( |
4025 | "[ATTACHMENT]: Rezzed attachment in point {0} from item {1} and asset {2} ({3})", | 4034 | "[ATTACHMENT]: Rezzed attachment in point {0} from item {1} and asset {2} ({3})", |