aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie2010-11-16 01:35:45 +0100
committerMelanie2010-11-16 01:35:45 +0100
commit7a9c57a81ec979564b089429bb93655912f823a2 (patch)
treefec2570cd04adae90e572ff605d37a41eacf5dea /OpenSim
parentDiva needs a spanking! Serializing OldItemID breaks script state (diff)
downloadopensim-SC-7a9c57a81ec979564b089429bb93655912f823a2.zip
opensim-SC-7a9c57a81ec979564b089429bb93655912f823a2.tar.gz
opensim-SC-7a9c57a81ec979564b089429bb93655912f823a2.tar.bz2
opensim-SC-7a9c57a81ec979564b089429bb93655912f823a2.tar.xz
When detaching a scripted item, always consider it modified. Script states
will have changed and for real usability, we need to save it. It bloats assets, but that can't be avoided.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs8
-rw-r--r--OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs2
2 files changed, 9 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index 6122cc2..929db21 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -527,10 +527,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
527 /// <param name="grp"></param> 527 /// <param name="grp"></param>
528 /// <param name="itemID"></param> 528 /// <param name="itemID"></param>
529 /// <param name="agentID"></param> 529 /// <param name="agentID"></param>
530 protected void UpdateKnownItem(IClientAPI remoteClient, SceneObjectGroup grp, UUID itemID, UUID agentID) 530 public void UpdateKnownItem(IClientAPI remoteClient, SceneObjectGroup grp, UUID itemID, UUID agentID)
531 { 531 {
532 if (grp != null) 532 if (grp != null)
533 { 533 {
534 // If an item contains scripts, it's always changed.
535 // This ensures script state is saved on detach
536 foreach (SceneObjectPart p in grp.Parts)
537 if (p.Inventory.ContainsScripts())
538 grp.HasGroupChanged = true;
539
534 if (!grp.HasGroupChanged) 540 if (!grp.HasGroupChanged)
535 { 541 {
536 m_log.WarnFormat("[ATTACHMENTS MODULE]: Save request for {0} which is unchanged", grp.UUID); 542 m_log.WarnFormat("[ATTACHMENTS MODULE]: Save request for {0} which is unchanged", grp.UUID);
diff --git a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
index a675928..1d9aeb9 100644
--- a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
@@ -133,5 +133,7 @@ namespace OpenSim.Region.Framework.Interfaces
133 /// <param name="sog"></param> 133 /// <param name="sog"></param>
134 /// <param name="pos"></param> 134 /// <param name="pos"></param>
135 void UpdateAttachmentPosition(IClientAPI client, SceneObjectGroup sog, Vector3 pos); 135 void UpdateAttachmentPosition(IClientAPI client, SceneObjectGroup sog, Vector3 pos);
136
137 void UpdateKnownItem(IClientAPI remoteClient, SceneObjectGroup grp, UUID itemID, UUID agentID);
136 } 138 }
137} 139}